Win a copy of The Business Blockchain this week in the Cloud forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

FORM based Authentication -HELP

 
Karthik Rajendiran
Ranch Hand
Posts: 218
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Doubt on Form Based Authentication
I have created web.xml and login.html, error.html entries as per given
the book instructions.

My Tomcat webapp is karthik which is in
d:\tomcat5\webapps\karthik

Following is my configuration.
when i tried http:\\localhost:8080\karthik\login.html
i get the login page when i submit the
i get error 404 http:\\localhost:8080\karthik\j_security_check not found

I have a doubt whether we have to request the constrained to enable the form
based authentication or login page. Please explain

web.xml
-------
<login-config>
<auth-method>FORM</auth-method>
<form-login-config>
<form-login-page>/login.html</form-login-page>
<form-error-page>/Error.html</form-error-page>
</form-login-config>
</login-config>


I kept the login.html and Error.html
in the webapp "karthik"
PATH IS D:\tomcat5\webapps\karthik

login.html
----------
<form method="POST" action="j_security_check">
<input type="text" name ="j_username">
<input type="password" name="j_password">
<input type="submit" value="Enter">
</form>

Error.html
----------
<html> <body>
sorry dude, wrong password </body> </html>
 
Karthik Rajendiran
Ranch Hand
Posts: 218
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ranchers, I misunderstood of requesting the login page. Then i added the security constraint and a resource. When i access constrained resource i get the customzied login page.

But it always leads me to the ERROR PAGE instead of the resource.
What are other configuration one should make?
 
Karthik Rajendiran
Ranch Hand
Posts: 218
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
YEEEEE HAWWW.
I got it finally.

AFter i login , i was getting 408 Error.(( time for
login process has been exceeded)).

THen i disabled the zone alarm firewall and tried.
NOW IT WORKS.

Finally solved. ZoneAlarm doesn't like "localhost" cookies.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic