Skip to main content

Proposed Final Draft of Servlet 3.0 now available

Posted by mode on May 8, 2009 at 1:58 PM PDT

The proposed final draft of the Servlet 3.0 specification is now available at the JCP site . In addition to the specification, also refer to Shing Wai's blog describing in detail the ordering solution for fragments and the use of security annotations.

Related Topics >>


I'm so excited about it, it was the first JSR spec I've fully read. Does anyone know if they solved the transitive Jar annotation problem, where essentially some random little class in some hijacked jar could have a /hackmeupbaby/ servlet that calls home and takes commands?

Rajiv, thank you for the presentation yesterday at the Google campus for SVJ. I just wanted to pose the questions I had for you online yesterday here: 1) Can the servlet spec address the displaying of directory contents without using container specific properties? If this is a JSP WG problem, how can we get this request moved to them? 2) JDK 6 Annotation Processor to write hints into Jars where annotated classes may be. You mentioned that that annotation scanning is super quick, so this shouldn't matter. 3) We use .xhtml files in jars, but to do so, we had to write a JSF ResourceResolver, can we instead use .xhtml resources in jars? The more specific question is will the ServletContext.getResource() method return content from META-INF/resource of any jar? You answered yes.

I was unclear one one aspect of asynchronous connections. In a previous draft (suspend-resume API), it was explicitly stated that the request would be redispatched if there were IO activity on the upstream request. What is the behavior now with the startAsync() API? Do we need to poll the request object in the async context for slowly arriving request data?

Coding - It does not appear that the spec states that web-fragment ordering effects annotation scanning, but I know this is still being discussed on the EG and should get in the spec before all is said and done.

Ah, perhaps it was not official, then. This is copied from the proposed servlet 3.0 javadocs: void suspend (long timeoutMs) Suspend the processing of the request and associated ServletResponse. [...] When the thread calling the filter chain and/or servlet has returned to the container with a suspended request, the thread is freed for other tasks and the request is held pending either: * a call to resume(). * a call to complete(). * the passed or default timeout expires. * there is IO activity on the connection that received the request, such as the close of the connection or the receipt of a pipelined request. After any of the events listed above, the suspended request will be redispatched via the filter and servlet processing. [...]

myk002 - I don't recall this functionality ever being mentioned in an official draft. Do u mind pointing out which section of which spec this was mentioned or was this mentioned in an informal form. - Max

Coding-i believe we have solved the transitive jar problem through the web fragment ordering. Those jars not in an absolute ordering will not be scanned. I cannot recall if this was actually in the pfd, but I'll check once I'm at my computer. - max