# Package javax.servlet.annotation

package javax.servlet.annotation

Related Packages
Package
Description
javax.servlet
The javax.servlet package contains a number of classes and interfaces that describe and define the contracts between a servlet class and the runtime environment provided for an instance of such a class by a conforming servlet container.
javax.servlet.descriptor
javax.servlet.http
The javax.servlet.http package contains a number of classes and interfaces that describe and define the contracts between a servlet class running under the HTTP protocol and the runtime environment provided for an instance of such a class by a conforming servlet container.
Class
Description
HandlesTypes
This annotation is used to declare an array of application classes which are passed to a `ServletContainerInitializer`.
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 corresponding `HttpMethodConstraint` in a `ServletSecurity` annotation.
HttpMethodConstraint
Specific security constraints can be applied to different types of request, differentiated by the HTTP protocol method type by using this annotation inside the `ServletSecurity` annotation.
MultipartConfig
This annotation is used to indicate that the `Servlet` on which it is declared expects requests to made using the `multipart/form-data` MIME type.
ServletSecurity
Declare this annotation on a `Servlet` implementation 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.
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.
WebFilter
The annotation used to declare a Servlet `Filter`.
WebInitParam
The annotation used to declare an initialization parameter on a `Servlet` or `Filter`, within a `WebFilter` or `WebServlet` annotation.
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`, `ServletRequestListener` or `HttpSessionIdListener`
E.g.
WebServlet
This annotation is used to declare the configuration of a `Servlet`.