tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <>
Subject Re: Form based auth - Not working
Date Mon, 08 Oct 2007 21:46:24 GMT
Hash: SHA1


Nicolas Gonzalez wrote:
> I have a DB with users and user-roles tables and data in those tables but
> every time I try
> to log in my application it will fail with no reason, nor log either!

Care to give us the database schema you are using? Please only show
those tables that are relevant (USERS and USER_ROLES). You might want to
provide sample contents for the user you are using as a test.

> I started thinking that any kind of authentication wasn't going to work, so
> I tried using the
> BASIC based one, which surprisingly worked :)

Well, that's telling. I'm guessing your <form> isn't done correctly.
Would you like to show us the form you are using, or should we keep

> validationQuery="select * from TEST"

Ouch! I wouldn't do that if I were you.

>     <Realm  className="org.apache.catalina.realm.JDBCRealm"

Since you've got a JNDI connection pool already configured, why not use
that for your Realm (DataSourceRealm) instead of a JDBCRealm. That way,
everything uses the same set of connections instead of one separate one
for logins.

> (as u may see, the realm is not a DataSourceRealm because it doesn't work at
> all, at least in my
> case!!! Another problem for another thread I guess...)

I'm guessing that your form is the problem, not the database.

- -chris
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla -


To start a new topic, e-mail:
To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message