How to implement authentication?
Hi,
I have a servlet name Financial and I want to restrict user from accessing this servelet and all of its coresponding jsp pages. I did put a security constraint to web.xml but what I receive is an error saying that the login page(directed by the container) does not exist! Here is what I have in my web.xml
...(more servlet definitions)
<security-constraint>
<display-name>Financial</display-name>
<web-resource-collection>
<web-resource-name>Financial</web-resource-name>
<description>Restrict access to fiancial servlet</description>
<url-pattern>/Financial</url-pattern>
<url-pattern>/Financial/*</url-pattern>
<http-method>GET</http-method>
<http-method>POST</http-method>
<http-method>HEAD</http-method>
<http-method>PUT</http-method>
<http-method>OPTIONS</http-method>
<http-method>TRACE</http-method>
<http-method>DELETE</http-method>
</web-resource-collection>
<auth-constraint>
<role-name>Admin</role-name>
<role-name>Member</role-name>
</auth-constraint>
</security-constraint>
<login-config>
<auth-method>FORM</auth-method>
<realm-name/>
<form-login-config>
<form-login-page>/WEB-INF/docs/authentication/login.html</form-login-page>
<form-error-page>/WEB-INF/docs/authentication/failure.html</form-error-page>
</form-login-config>
</login-config>
<security-role>
<description>User who has been register</description>
<role-name>Member</role-name>
</security-role>
-
In addition, how can i use database /ldap server to perform username,pass,role lookup instead of the tomcat-user.xml by default?
Hope to get some help
Thai

