• 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
  • paul wheaton
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

security constraints - login doesnt work

 
Ranch Hand
Posts: 1183
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hey,

i am new to the whole servlets & jsp story and i'm playing around a little with security constraints ...

i chose FORM as the auth type, created users in the tomcat-users.xml file, but when i try to log on, it will always forward me to the error page.

here is my code

login.html



web.xml



tomcat-users.xml



does anybody know what the problem is ??

also, how would i retrieve the role and user information from a database, rather than using and xml file?

thank you


 
Ranch Hand
Posts: 262
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
re:

how would i retrieve the role and user information from a database, rather than using and xml file?



... you might find the "Defining a JDBCRealm" section of this article useful:

http://www.big-oh.net/content/tutorials/containerManagedAuthentication.jsp
 
Sebastian Janisch
Ranch Hand
Posts: 1183
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thank you :-)

i have solved the tomcat-users.xml problem.

i was editing the xml file under tomcat/conf. eclipse however has it's own copy somewhere deep in the dir structure.
 
He repaced his skull with glass. So you can see his brain. Kinda like this tiny ad:
Clean our rivers and oceans from home
https://www.kickstarter.com/projects/paulwheaton/willow-feeders
reply
    Bookmark Topic Watch Topic
  • New Topic