Thanks for your reply!
See below...

Roberts, Eric wrote:

Hi,

Try this:

First define your DataSource resource e.g.
<Resource name="jdbc/esljsp" auth="Container" scope="Shareable" type="javax.sql.DataSource"/>

and add the necessary <ResourceParams name="jdbc/esljsp">
and the parameters.
then define your Realm using:

dataSourceName="jdbc/esljsp"
I already have these lines in config.xml:

--= [ server.xml ] =--
<Resource name="jdbc/esljsp"
type="javax.sql.DataSource"
auth="Container"
scope="Shareable"
description="Database resource for esljsp project" />
<ResourceParams name="jdbc/esljsp">
<!-- various parameters not shown here -->
</ResourceParams>
<Realm className="org.apache.catalina.realm.DataSourceRealm"
dataSourceName="java:/comp/env/jdbc/esljsp"
debug="5"
userTable="T_USERS"
userNameCol="NAME"
userCredCol="PASSWORD"
userRolesTable="T_USERROLES"
roleNameCol="ROLENAME" />
--= [ / server.xml ] =--

If I haven't them there, I wouldn't be able to connect to database in my servlets, getting DataSource through JNDI. But servlets work just fine.
And exception is thrown while Tomcat starts up, telling me that "java:" name is not found, so this must not be configuration problem.

HTH

Eric

-----Original Message-----
--= [ cut ] =--


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to