Meaningless Drivel is fun!
The moose likes JSP and the fly likes Form based authentication Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "Form based authentication" Watch "Form based authentication" New topic

Form based authentication

prasad valeti

Joined: Oct 18, 2005
Posts: 7
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

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 Cannot create JDBC driver of class '
' for connect URL 'null'
Christophe Verré

Joined: Nov 24, 2005
Posts: 14688

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 :

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 :

[My Blog]
All roads lead to JavaRanch
I agree. Here's the link:
subject: Form based authentication
jQuery in Action, 3rd edition