Servlet 3.0 Features
In this section, you will learn about new features added in the Servlet 3.0 .
Java Servlet is a server-side web-based technology utilized for constructing
dynamic web content for web-based applications. It broadens the potentiality of
servers, which host web-based applications, through harnessing
request-response programming model.
In the early days of Java, Servlet's thought came into the mind of James
Gosling but it didn't became reality until the release of Java Web Server
product . The first Servlet API version 1.0 was released on June 1997. The
latest released version of Servlet API until now, when i am writing this, is Servlet 3.0
Key changes in Servlet 3.0
Given below the major changes in Servlet 3.0 :
- Pluggability and extensibility
- Asynchronous support
- Security enhancements
Detailed List of Changes in Servlet 3.0
Given below detailed list of changes in Servlet 3.0 as per the sequence of
addition / elimination :
- The suspend / resume APIs are no longer present . They have been
replaced by startAsync and AsyncContext which now has
forward and complete methods.
- Annotation names have changed and there are only top level annotations.
The method level annotations for declaring the Servlet methods are no longer
- The rules for assembling web.xml from fragments and annotations
- Updated isAsyncStarted to return false once a dispatch to the
container or a call to complete is done from the async handler.
- Added ordering support for fragments.
- Added support for file upload.
- Added support for loading static resources and JSPs from JAR files that
are included in the META-INF/resources directory of the JAR file which is
then bundled in the WEB-INF/lib directory.
- Added programmatic login / logout support.
- Clarified welcome files.
- Re-factored some of the Async APIs - moved addAsyncListener to
AsyncContext and renamed it to addListener. Moved
setAsyncTimeout to AsyncContext and renamed it to
- Clarified some of the semantics around concurrent access to the request
and response in async processing.
- Updated pluggability rules for resource reference elements.
- Added a new annotation - @ServletSecurity (and associated
annotation for the fields) for defining security .