Package javax.servlet.annotation
The javax.servlet.annotation package contains a number of annotations
that allow users to use annotations to declare servlets, filters,
listeners and specify the metadata for the declared component.
- Since:
- Servlet 3.0
-
Enum Summary Enum Description ServletSecurity.EmptyRoleSemantic Represents the two possible values of the empty role semantic, active when a list of role names is empty.ServletSecurity.TransportGuarantee Represents the two possible values of data transport, encrypted or not. -
Annotation Types Summary Annotation Type Description HandlesTypes This annotation is used to declare an array of application classes which are passed to aServletContainerInitializer.HttpConstraint This annotation represents the security constraints that are applied to all requests with HTTP protocol method types that are not otherwise represented by a correspondingHttpMethodConstraintin aServletSecurityannotation.HttpMethodConstraint Specific security constraints can be applied to different types of request, differentiated by the HTTP protocol method type by using this annotation inside theServletSecurityannotation.MultipartConfig This annotation is used to indicate that theServleton which it is declared expects requests to made using themultipart/form-dataMIME type.ServletSecurity Declare this annotation on aServletimplementation class to enforce security constraints on HTTP protocol requests.
The container applies constraints to the URL patterns mapped to each Servlet which declares this annotation.
WebFilter The annotation used to declare a ServletFilter.WebInitParam The annotation used to declare an initialization parameter on aServletorFilter, within aWebFilterorWebServletannotation.
E.g.WebListener The annotation used to declare a listener for various types of event, in a given web application context.
The class annotated MUST implement one, (or more), of the following interfaces:HttpSessionAttributeListener,HttpSessionListener,ServletContextAttributeListener,ServletContextListener,ServletRequestAttributeListener,ServletRequestListenerorHttpSessionIdListener
E.g.WebServlet This annotation is used to declare the configuration of aServlet.