Refer to "2.1.1 What are Web Applications?" for an outline of Web applications.
The specification for the Web application contained in Java EE 6 is Servlet 3.0.
The following main features have been added in Servlet 3.0:
Definitions for servlet and filter settings using annotations
Servlet or servlet filter settings can be inserted directly into classes using annotations. It is possible to avoid using web.xml.
Settings for each framework
Pluggability is improved by using Web fragment descriptors to define the settings for each framework and including them jar files.
File uploading
Multipart data is supported, so files can now be uploaded easily.
Asynchronous processing
Asynchronous processes can be started on another thread, so push applications can be developed.
Definitions for Servlet and Filter Settings using Annotations
In Servlet 3.0, it is now possible to define servlet and servlet filter settings with annotations. Accordingly, the web.xml settings can be overwritten using the content defined in the annotation, so web.xml does not have to be used. The following shows the annotations used for the main servlet settings:
@WebServlet
This defines the servlet class. This behaves the same as the web.xml elements <servlet> and <servlet-mapping>.
@WebFilter
This defines the servlet filter. This behaves the same as the web.xml elements <filter> and <filter-mapping>.
@WebListner
This defines the listener class. This behaves the same as the web.xml element <listener>.
The servlet settings can be defined by setting these annotations in the class that implements the servlet, servlet filter, and listener interface.
Point
Refer to the following specifications for details on Servlet 3.0:
JSR-315: Java(TM) Servlet 3.0 Specification
Refer to the following specifications for details on JSP 2.2:
JSR-245: JavaServer(TM) Pages 2.2
Refer to the following specifications for details on JSF 2.1:
JSR-314: JavaServer Faces 2.1
Refer to "2.2.2 Development Flow" and "2.2.3 Development Procedures" for information on the flow and procedures for developing Web applications. Refer to "9.6.1 Preparing to Create Applications" for information on preparations for creating annotations.
Note
Specify "JavaServer Faces v2.0 Project" in [Configuration] in the Dynamic Web Project wizard to use JSF in the Web application.