Win a copy of Spring in Action (5th edition) this week in the Spring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Ganesh Patekar
  • Frits Walraven
  • Tim Moores
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Stephan van Hulst
  • salvin francis
  • Tim Holloway

FORM based Authentication -HELP  RSS feed

 
Ranch Hand
Posts: 221
  • 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: 221
  • 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: 221
  • 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.
 
Can you really tell me that we aren't dealing with suspicious baked goods? And then there is this tiny ad:
Download Free Java APIs to Work with Office Files and PDF
htttp://www.e-iceblue.com/free-apis.html
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!