Well I've got JDBCRealm working for the entire server, but when I try to
wrap the realm in a context for a specific
webapp it stops working. Anyone have any ideas why? Is my Context
specification not correct?
- Original Message -
From: "joelsherriff" <[EMAIL PROTECTED]>
To: "Tomcat Users List"
Sent: Friday, April 22, 2005 3:56 PM
Subject: Help with JDBCRealm config on Tomcat 4.1
> Hope someone can help me - I'm still a relative newbie to tomcat, am
baffled
> at this point and I can't even get it configured so that I
> can get debug info to find out what's wrong.
>
> I've added a context to my server.xml for the webapp I'm trying to set up
> JDBCRealm authentication for:
>
>
> prefix="localhost_blojsom_log." suffix=".txt" timestamp="true" />
> debug="99" driverName="org.gjt.mm.mysql.Driver"
>
>
connectionURL="jdbc:mysql://localhost/mydatabase?user=xx;password=xx
> "
> connectionName="xx" connectionPassword="xx"
> digest="MD5"
> userTable="users" userNameCol="userid"
> userCredCol="md5password"
> userRoleTable="user_roles" roleNameCol="role_name" />
>
>
> And, of course, added the supporting tables and roles to my database.
When
> I attempt to access a page from the webapp,
> my login.jsp page is displayed, and when I attempt to login, my error.jsp
> page is displayed. I didn't expect this to work
> correctly the first time I configured it, and it's not, but my problem is
> that I can't figure out how to debug it at all. The
> Logger I have configured in the webapp's Context does nothing - doesn't
> create the log file and nothing is logged
> anywhere else either. How can I further debug it?
>
> Now, if I take the Realm out of the Context (applying it to the entire
> server), I get an exception in my catalina_log:
>
> 2005-04-22 15:26:10 JDBCRealm[Standalone]: Exception performing
> authentication
> java.sql.SQLException: org.gjt.mm.mysql.Driver
> at org.apache.catalina.realm.JDBCRealm.open(JDBCRealm.java:588)
> at org.apache.catalina.realm.JDBCRealm.authenticate(JDBCRealm.java:343)
>
> Though it doesn't say it precisely, I think this implies that it's not
> connecting to the DB, but the db, user and password values are all
correct.
>
> Basically, I have three problems: why can't I get logging to work from
> within a specific context, am I doing something wrong in my attempt
> to get JDBCRealm authentication to work, and what is the right way to
debug
> the problem further, if the solution isn't obvious?
>
> Also, I've added to my webapp's web.xml file:
>
>
>
> Entire Application
> /*
>
>
> users
>
>
>
>
> FORM
> Users
>
> /login.jsp
> /error.jsp
>
>
>
>
>
> Some Stuff
>
> users
>
>
>
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]