Servlet 3.0 samples demonstrate new Servlet 3.0 functionality. Learn how to programmatically add servlets, configure web fragments, use an asynchronous servlet, or use a ServletContainerInitializer.
10 minutes
To use the samples, download Servlet 3.0 sample files from a product download site. Complete the following steps:
This sample shows how to programmatically add servlets, filters, and/or listeners. For more information, see the Servlet 3.0 programmatic configuration topic.
This sample shows how to use an asynchronous servlet to process a long running request and then dispatch back to write out the response. For more information, see the Java Servlet 3.0 considerations topic.
This sample shows how to include a JAR file that contains a web-fragment.xml file. For more information, see the Web fragments topic.
This module shows how to use a ServletContainerInitializer to help initialize the application. For more information, see the Servlet 3.0 programmatic configuration topic.