permaculture playing cards
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Doubt on authentication Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Doubt on authentication" Watch "Doubt on authentication" New topic
Author

Doubt on authentication

smitha nair
Greenhorn

Joined: Feb 28, 2005
Posts: 2
Hi
In my tomcat userrs file:-
<tomcat-users>
<role name="Guest"/>
<role name="Member"/>
<role name="Admin"/>
<user name="Bill" password="member" roles="Member"/>
<user name="sham" password="admin" roles="Admin,Guest"/>
<user name="mini" password="guest" roles="Guest"/>
</tomcat-users>
In web.xml:-
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" version="2.4">
<servlet>
<servlet-name>Check_Authentication</servlet-name>
<servlet-class>com.example.Check_Authentication</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>Check_Authentication</servlet-name>
<url-pattern>/Check_Authentication</url-pattern>
</servlet-mapping>
<security-role>
<role-name>Admin</role-name>
</security-role>
<security-constraint>
<web-resource-collection>
<web-resource-name>check</web-resource-name>
<url-pattern>/Check_Authentication</url-pattern>
<http-method>POST</http-method>
</web-resource-collection>
<auth-constraint>
<role-name>Admin</role-name>
</auth-constraint>
</security-constraint>
<login-config>
<auth-method>FORM</auth-method>
<form-login-config>
<form-login-page>/loginPage.html</form-login-page>
<form-error-page>/loginError.html</form-error-page>
</form-login-config>
</login-config>
</web-app>
when i request this source which used post method.i get the custom form atuhentication page ,but when i give username and password it is not recognizing and shows error page instead of going to the resource(servlet).
please someone tell what is the problem..
 
Have you checked out Aspose?
 
subject: Doubt on authentication
 
It's not a secret anymore!