Win a copy of Real-World Software Development: A Project-Driven Guide to Fundamentals in Java this week in the Agile and Other Processes forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Liutauras Vilda
  • Knute Snortum
  • Bear Bibeault
Sheriffs:
  • Devaka Cooray
  • Jeanne Boyarsky
  • Junilu Lacar
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • salvin francis
Bartenders:
  • Tim Holloway
  • Piet Souris
  • Frits Walraven

security constraints - login doesnt work

 
Ranch Hand
Posts: 1183
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • 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.
 
Hey cool! They got a blimp! But I have a tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!