javax.servlet.annotation
Annotation Type ServletSecurity


@Inherited
@Target(value=TYPE)
@Retention(value=RUNTIME)
@Documented
public @interface 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.

Since:
Servlet 3.0

Optional Element Summary
 HttpMethodConstraint[] httpMethodConstraints
          An array of HttpMethodContraint objects to which the security constraint will be applied
 HttpConstraint value
          The default constraint to apply to requests not handled by specific method constraints
 

value

public abstract HttpConstraint value
The default constraint to apply to requests not handled by specific method constraints

Returns:
http constraint
Default:
@javax.servlet.annotation.HttpConstraint

httpMethodConstraints

public abstract HttpMethodConstraint[] httpMethodConstraints
An array of HttpMethodContraint objects to which the security constraint will be applied

Returns:
array of http method constraint
Default:
{}

(Built by coreservlets)

As of July 2010, there were no online versions of the servlet 3.0, JSP 2.2, and EL 2.2 Javadocs, except as part of the huge Java EE 6 API. So, I built them myself from the Tomcat 7 source code.

Java EE TutorialsJava EE Training