This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
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


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: security constraints - login doesnt work
 
Similar Threads
login-config not prompting for user id and password
security constraint - not working
login-config not working
BASIC authentication not working
HTTP Status 403 Access to the requested resource has been denied