2.8.3 @HttpMethodConstraint

Organization of this subsection
(1) Description
(2) Attribute

(1) Description

This annotation specifies the security constraints of the HTTP method.

(2) Attribute

(a) The following table lists the @HttpMethodConstraint attributes.
Attribute nameFunctionality
valueThis attribute specifies the HTTP method that applies security constraints.
emptyRoleSemanticThis attribute specifies the behavior when the role is not specified.
rolesAllowedThis attribute specifies the list of user names used for authentication.
transportGuaranteeThis attribute specifies the method to communicate between the client and server.

Details of each attribute are as follows:

(b) value attribute
Type
String
Description
This attribute specifies the HTTP method that applies security constraints.
Default value
None
(c) emptyRoleSemantic attribute
Type
ServletSecurity.EmptyRoleSemantic
Description
This attribute specifies the behavior when the role is not specified.
Default value
javax.servlet.annotation.ServletSecurity.
EmptyRoleSemantic.
PERMIT
(d) rolesAllowed attribute
Type
String[]
Description
This attribute specifies the list of user names used for authentication.
Default value
{}
(e) transportGuarantee attribute
Type
ServletSecurity.TransportGuarantee
Description
This attribute specifies the method to communicate between the client and server.
Default value
javax.servlet.annotation.ServletSecurity.
TransportGuarantee.
NONE