Top Description Inners Methods
javax.servlet.annotation

public @Interface ServletSecurity

extends Annotation
Annotations
@Inherited
@Documented
@Target:TYPE
@Retention:RUNTIME
Imports
java.lang.annotation.Documented, .ElementType, .Inherited, .Target, .Retention, .RetentionPolicy

This annotation is used on a Servlet implementation class to specify security constraints to be enforced by a Servlet container on HTTP protocol messages. The Servlet container will enforce these constraints on the url-patterns mapped to the servlets mapped to the annotated class.
Since
Servlet 3.0

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static enum
ServletSecurity.EmptyRoleSemantic

Defines the access semantic to be applied to an empty rolesAllowed array.

public static enum
ServletSecurity.TransportGuarantee

Defines the data protection requirements that must be satisfied by the transport

Method Summary

Modifier and TypeMethod and Description
public HttpMethodConstraint[]

Returns:

an array of HttpMethodConstraint elements each defining the protection to be applied to one HTTP protocol method. For any HTTP method name, there must be at most one corresponding element in the returned array. If the returned array is of zero length, it indicates that no HTTP method specific constraints are defined.
httpMethodConstraints
()

Get the HTTP method specific constraints.

public HttpConstraint

Returns:

a HttpConstraint object.
value
()

Get the HttpConstraint that defines the protection that is to be applied to all HTTP methods that are NOT represented in the array returned by httpMethodConstraints.

Inherited from java.lang.annotation.Annotation:
annotationTypeequalshashCodetoString

Method Detail

httpMethodConstraintsback to summary
public HttpMethodConstraint[] httpMethodConstraints()

Get the HTTP method specific constraints. Each HttpMethodConstraint names an HTTP protocol method and defines the protection to be applied to it.

Returns:HttpMethodConstraint[]

an array of HttpMethodConstraint elements each defining the protection to be applied to one HTTP protocol method. For any HTTP method name, there must be at most one corresponding element in the returned array. If the returned array is of zero length, it indicates that no HTTP method specific constraints are defined.

valueback to summary
public HttpConstraint value()

Get the HttpConstraint that defines the protection that is to be applied to all HTTP methods that are NOT represented in the array returned by httpMethodConstraints.

Returns:HttpConstraint

a HttpConstraint object.

javax.servlet.annotation back to summary

public final Enum ServletSecurity.EmptyRoleSemantic

extends Enum<ServletSecurity.EmptyRoleSemantic>
Class Inheritance

Defines the access semantic to be applied to an empty rolesAllowed array.

Field Summary

Modifier and TypeField and Description
public static final ServletSecurity.EmptyRoleSemantic
DENY

access is to be denied independent of authentication state and identity.

public static final ServletSecurity.EmptyRoleSemantic
PERMIT

access is to be permitted independent of authentication state and identity.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static ServletSecurity.EmptyRoleSemantic
public static ServletSecurity.EmptyRoleSemantic[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

DENYback to summary
public static final ServletSecurity.EmptyRoleSemantic DENY

access is to be denied independent of authentication state and identity.

PERMITback to summary
public static final ServletSecurity.EmptyRoleSemantic PERMIT

access is to be permitted independent of authentication state and identity.

Constructor Detail

EmptyRoleSemanticback to summary
private EmptyRoleSemantic()

Method Detail

valueOfback to summary
public static ServletSecurity.EmptyRoleSemantic valueOf(String name)
valuesback to summary
public static ServletSecurity.EmptyRoleSemantic[] values()
javax.servlet.annotation back to summary

public final Enum ServletSecurity.TransportGuarantee

extends Enum<ServletSecurity.TransportGuarantee>
Class Inheritance

Defines the data protection requirements that must be satisfied by the transport

Field Summary

Modifier and TypeField and Description
public static final ServletSecurity.TransportGuarantee
CONFIDENTIAL

All user data must be encrypted by the transport (typically using SSL/TLS).

public static final ServletSecurity.TransportGuarantee
NONE

no protection of user data must be performed by the transport.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static ServletSecurity.TransportGuarantee
public static ServletSecurity.TransportGuarantee[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

CONFIDENTIALback to summary
public static final ServletSecurity.TransportGuarantee CONFIDENTIAL

All user data must be encrypted by the transport (typically using SSL/TLS).

NONEback to summary
public static final ServletSecurity.TransportGuarantee NONE

no protection of user data must be performed by the transport.

Constructor Detail

TransportGuaranteeback to summary
private TransportGuarantee()

Method Detail

valueOfback to summary
public static ServletSecurity.TransportGuarantee valueOf(String name)
valuesback to summary
public static ServletSecurity.TransportGuarantee[] values()