File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes security constraints - login doesnt work Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "security constraints - login doesnt work" Watch "security constraints - login doesnt work" New topic
Author

security constraints - login doesnt work

Sebastian Janisch
Ranch Hand

Joined: Feb 23, 2009
Posts: 1183
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



JDBCSupport - An easy to use, light-weight JDBC framework -
Dave Wingate
Ranch Hand

Joined: Mar 26, 2002
Posts: 262
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


Fun programming etcetera!
Sebastian Janisch
Ranch Hand

Joined: Feb 23, 2009
Posts: 1183
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.
 
 
subject: security constraints - login doesnt work