1. Add annotation support, these annotation are mainly in the Javax.servlet.annotation package, the servlet can not only use these annotation, but also can use other common Java annotations.
2. Add servlet modular functionality, the official term is web fragment, that is, a Web project can have multiple similar web.xml feature files, of course a project can have only one web.xml file, can have multiple web- Fragment.xml files, the server will look for web-fragment.xml files from web-inf/classes and web-inf/lib directories, web-inf/ The Web-fragment.xml file under Lib must be placed in the META-INFA directory of the jar package. Finally, these web-frament.xml files can specify the order.
3. Improve the meta programming capabilities of the servlet, that is, dynamic registration Servlet,filter,listener. The main performance is the Javax.servlet.ServletContext interface has added many methods, such as: Addservlet, addfilter, AddListener, these methods can dynamically add Servlet,filter, Listener, etc.
4. Added direct support for file uploads, Add the Getpart and GetParts method to Javax.servlet.http.HttpServletRequest, and add the Javax.servlet.http.Part interface, which should have provided this feature earlier, the unified file upload interface.
5. The JSP file is packaged into a jar package as a resource file and deployed directly to the Web-inf/lib directory, which has many benefits for the product development project. The JSP file must be placed in a specific directory in the JAR package: Jar/meta-inf/resources. This directory is specified by the servlet specification and cannot be changed.
6. Added Javax.servlet.SessionCookieConfig interface, support session tracking customization, we all know cookies are used to implement the session mechanism of one of the methods, and most of the time is the server's default preferred method, before servlet3.0 to The default name of the cookie that implements the session is that the Jsessionid,servlet specification does not provide an interface to customize the property. I don't see the benefit of this customization for a while.
7. The most important new feature: support for asynchronous operations, which is tantamount to raising server-side AJAX support to the normative level, the previous servlet to Ajax support is simulated, because the servlet synchronization operation, must have a return value, even if the browser side do not return any results, The thread also waits for the servlet to finish executing.
8.ServletContainerInitializer