This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of The Journey To Enterprise Agility and have Daryl Kulak & Hong Li on-line!
See this thread for details.
Win a copy of The Journey To Enterprise Agility this week in the Agile and Other Processes forum! And see the welcome thread for 20% off.
  • 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:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Junilu Lacar
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Ganesh Patekar
  • Tim Moores
  • Pete Letkeman
  • Stephan van Hulst
Bartenders:
  • Carey Brown
  • Tim Holloway
  • Joe Ess

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.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!