These tutorials demonstrate how to use Servlet 3.x annotations to declare web components, dynamic registration of the web components and modularization of the web application.
Java Servlet 3.0 new Annotations defined in javax.servlet.annotation package. Describing how these annotations are scanned by the servlet container.
Example on how create a servlet component using @WebServlet.
Example on how create a filter component using @WebFilter.
Understanding DispatcherType.
Example on how create a listener component using @WebListener.
Example on how create a file upload servlet component using @MultipartConfig.
Example on how create a servlet component using @ServletSecurity to restrict access to resources.
Triggering container managed authentication by using HttpServletRequest.authenticate() method.
How to use programmatic security with web applications.
Programmatic definition of servlets, filters and the url pattern using Java Servlet 3.0 API. Use cases of Programmatic Configuration.
ServletContainerInitializer example project. Demonstrating how a servlet based framework can be designed using new capabilities.
Servlet Web Fragment introduction and concepts with an example project using container managed, form based security.
Example to show how to process request asynchronously in filters and servlets.
Using javax.servlet.http.Cookie
HttpSessionListener example and in what cases they should be used?
Understanding HttpSessionBindingListener with example.
Understanding HttpSessionAttributeListener with example
Servlet 3.0 introduces a standard way to configure/change the container's underlying session tracking mechanism.
How to protect servlets against session Fixation attack?
How to redirect/forward to login page after session timeout?
Auto redirect using JQuery.
How to use customized error pages in Java Servlets?
How to maintain browser side cache with 'Last-Modified' and 'If-Modified-Since' in Java Servlet?
How use 'ETag' and 'If-None-Match' headers to cache unchanged resources in Java Servlet?
How to perform permanent and temporary URL redirection from Java Servlets?
How to implement CORS in Java Servlet?
Using tomcat filter (CorsFilter) which provides ready to use CORS functionality.
How to handle HTTP PUT requests in Servlets?
How to handle HTTP HEAD requests in Servlets?
Sign in users with Google account, delegating user authentication to Google in our servlet based application.