tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From walterw <>
Subject JNDI configuration in webapp/META-INF/context.xml
Date Sat, 13 Sep 2008 21:38:15 GMT

Hi all,

I have tried setting up JNDI for my web application inside the applicaton's
WAR file itself to no avail.  If I use the same configuration, but put it in
my server's context.xml, it works fine.

Here is the configuration I am using:
<?xml version="1.0" encoding="US-ASCII"?>
	<!-- Even
		though this works inside of tomcat/conf/context.xml and the
		documentation says it should work here, it doesn't
<context reloadable="true">
	<Resource name="${jndi.URL}" auth="Container" type="javax.sql.DataSource"
		driverClassName="${jdbc.driverClassName}" url="${jdbc.url}"
		password="${jdbc.password}" maxActive="100" maxIdle="30" maxWait="10000"

The parameters specified dynamically via ${} are filtered via
maven-resources-plugin, so that is not an issue.  The issue is just with
this configuration placed inside my webapp, I can't get a JNDI connection,
but if it is in the server's context.xml, it works great.

View this message in context:
Sent from the Tomcat - User mailing list archive at

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

View raw message