Hi,
I need help in adding multiple security constraints in web.xml.
I want to add two security constraints in web.xml. I did but while deployment it is giving error in web.xml.
I have added in following manner, sample from web.xml :
<web-app>
<
servlet>
</servlet>
<security-constraint>
<display-name>abcConstraint</display-name>
<web-resource-collection>
<web-resource-name>abcCollection</web-resource-name>
<url-pattern>/*</url-pattern>
<http-method>GET</http-method>
<http-method>PUT</http-method>
<http-method>HEAD</http-method>
<http-method>TRACE</http-method>
<http-method>POST</http-method>
<http-method>DELETE</http-method>
<http-method>OPTIONS</http-method>
</web-resource-collection>
<auth-constraint>
<role-name>abc</role-name>
</auth-constraint>
</security-constraint>
<security-constraint>
<display-name>Access To App</display-name>
<web-resource-collection>
<web-resource-name>App Resource</web-resource-name>
<url-pattern>/*</url-pattern>
<http-method>GET</http-method>
<http-method>PUT</http-method>
<http-method>POST</http-method>
</web-resource-collection>
<auth-constraint>
<role-name>def</role-name>
</auth-constraint>
</security-constraint>
<login-config>
<auth-method>BASIC</auth-method>
<realm-name>My App</realm-name>
</login-config>
<security-role>
<role-name>abc</role-name>
</security-role>
</security-role>
<role-name>def</role-name>
<security-role>
</web-app>