O'Reilly logo

Servlet, JSP and Spring MVC: A Tutorial by Budi Kurniawan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Appendix B

Web Annotations

Servlet 3 comes with a set of annotation types in the javax.servlet.annotation package for annotating web objects such as servlets, filters, and listeners. This Appendix lists the annotation types.

HandlesTypes

This annotation type is used to declare the class types that a ServletContainerInitializer can handle. It has one attribute, value, that is used to declare the class types. For example, the following ServletContainerInitializer is annotated with @HandleTypes that declares that the initializer can handle UsefulServlet.

@HandlesTypes({UsefulServlet.class})
public class MyInitializer implements ServletContainerInitializer {
    ...
}

HttpConstraint

The HttpConstraint annotation type represents the security ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required