Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Form based authentication

 
prasad valeti
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm doing a sample example for form based authentication by using tomcat4.1 web server.

for that one i wrote some users and corresponding passwords in tomcat_users.xml.

i created two jsp's 1.default.jsp
2.login.jsp

In default.jsp page i'm taking the username and password and those values passing to login.jsp.

In login.jsp i'm taking those values from default.jsp and checking those values in userDatabase ie by defaulty maintained by tomcat for users(tomcat-users.xml).
while i'm checking(username and password) in that userdatabase i'm
getting some errors
1.org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of class '
' for connect URL 'null'


2..com.opensymphony.module.user.EntityNotFoundException
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1. This is not form based authentication you're doing here. You should read a tutorial first on how to use form based authentication. Here's one :
http://www.onjava.com/pub/a/onjava/2002/06/12/form.html

2. If you're maintaining users in tomcat-users.xml, why are you trying to access the database ? If you want to use a database to authenticate users, check Tomcat's FAQ here :
http://faq.javaranch.com/view?TomcatFaq
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic