I was trying to secure one
servlet and I have a login.jsp for collecting the user name and password from the user. I made the changes in the web.xml and I don�t know how to create users on the server (
test server, if possible thru WSAD5.1) and turn the security on. I am posting the relevant portion of my web.xml. Somebody please help.
Thanks in advance.
- <security-constraint>
<display-name>constraintSSL</display-name>
- <web-resource-collection>
<web-resource-name>login page resource</web-resource-name>
<description />
<url-pattern>/login.jsp</url-pattern>
<http-method>GET</http-method>
<http-method>PUT</http-method>
<http-method>POST</http-method>
<http-method>DELETE</http-method>
</web-resource-collection>
- <auth-constraint>
<description />
<role-name>everyone</role-name>
</auth-constraint>
- <user-data-constraint>
<transport-guarantee>CONFIDENTIAL</transport-guarantee>
</user-data-constraint>
</security-constraint>
- <security-constraint>
<display-name>non SSL constraint</display-name>
- <web-resource-collection>
<web-resource-name>secured servlet resource</web-resource-name>
<description />
<url-pattern>/MemberS</url-pattern>
<http-method>GET</http-method>
<http-method>PUT</http-method>
<http-method>POST</http-method>
<http-method>DELETE</http-method>
</web-resource-collection>
- <auth-constraint>
<description />
<role-name>authenticated_user</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>/loginError.html</form-error-page>
</form-login-config>
</login-config>
- <security-role>
<description />
<role-name>everyone</role-name>
</security-role>
- <security-role>
<description />
<role-name>authenticated_user</role-name>
</security-role>