• 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 Login

 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I'm attempting a simple Form-Based login to authenticate a user and give access to my site. I authenticate their username and password against a database and based on the role they have (also stored in the database) I grant them access. I'm using Tomcat 4's JDBCRealm to authenticate.
Unfortunately my results are very inconsistent. Sometimes I'm able to login and sometimes I get 404(Resourse not found) errors. In the address bar I notice it reads: "<myApp>/j_security_check" when it should be forwarding it to "<myApp>/index.jsp". Also I sometimes get a 401 (Invalid Redirect) error. Below is the relevant code to my login page, taken straight from tutorials. Any help would be appreciated.
Thanks
RK
 
They worship nothing. They say it's because nothing is worth fighting for. Like 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