我在web.xml
:
<security-constraint>
<display-name>Constraint-0</display-name>
<web-resource-collection>
<web-resource-name>Constraint-0</web-resource-name>
<url-pattern>/books</url-pattern>
</web-resource-collection>
<auth-constraint>
<role-name>Buyer</role-name>
</auth-constraint>
<user-data-constraint>
<transport-guarantee>NONE</transport-guarantee>
</user-data-constraint>
</security-constraint>
<security-constraint>
<display-name>Constraint-1</display-name>
<web-resource-collection>
<web-resource-name>Constraint-1</web-resource-name>
<url-pattern>/*</url-pattern>
</web-resource-collection>
<auth-constraint>
<role-name>Seller</role-name>
</auth-constraint>
<user-data-constraint>
<transport-guarantee>NONE</transport-guarantee>
</user-data-constraint>
</security-constraint>
<login-config>
<auth-method>FORM</auth-method>
<form-login-config>
<form-login-page>/login.jsp</form-login-page>
<form-error-page>/failedlogin.jsp</form-error-page>
</form-login-config>
</login-config>
<security-role>
<role-name>Buyer</role-name>
</security-role>
<security-role>
<role-name>Seller</role-name>
</security-role>
我想允许用户未经授权访问registration.jsp
页面。
问题:为了让它发生,我应该添加到我的网页描述符中?