This week's book giveaway is in the Programmer Certification forum.
We're giving away four copies of OCP Oracle Certified Professional Java SE 21 Developer Study Guide: Exam 1Z0-830 and have Jeanne Boyarsky & Scott Selikoff on-line!
See this thread for details.
  • 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

FORM based Authentication -HELP

 
Ranch Hand
Posts: 228
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 228
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 228
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
We noticed he had no friends. So we gave him this tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic