tomcat oracle datasource <p>I have apache tomcat 5.5.28 on my windows box and I am trying to deploy a web application (WAR) which works fine on other servers.</p> <p>However I am having trouble creating a datasource. I am not sure of the format. The db is oracle.</p> <p>Here is what I have in server.xml.</p> <pre><code> &lt;GlobalNamingResources&gt; &lt;Environment name="simpleValue" type="java.lang.Integer" value="30"/&gt; &lt;Resource name="tomdb11" type="oracle.jdbc.pool.OracleDataSource" maxActive="4" maxIdle="2" username="tomdb11" maxWait="5000" driverClassName="oracle.jdbc.driver.OracleDriver" validationQuery="select * from dual" password="remotedb11" url="jdbc:oracle:thin:@dbserver:1521:orcl"/&gt; &lt;Resource auth="Container" description="User database that can be updated and saved" name="UserDatabase" type="org.apache.catalina.UserDatabase" factory="org.apache.catalina.users.MemoryUserDatabaseFactory" pathname="conf/tomcat-users.xml"/&gt; &lt;/GlobalNamingResources&gt; </code></pre> <p>How do I access this in the web.xml where usually what I have which works in other servers is</p> <pre><code>&lt;context-param&gt; &lt;param-name&gt;databaseUser&lt;/param-name&gt; &lt;param-value&gt;tomdb11&lt;/param-value&gt; &lt;/context-param&gt; &lt;context-param&gt; &lt;param-name&gt;databasePassword&lt;/param-name&gt; &lt;param-value&gt;tomdb11&lt;/param-value&gt; &lt;/context-param&gt; &lt;context-param&gt; &lt;param-name&gt;databaseSchema&lt;/param-name&gt; &lt;param-value&gt;TOMDBADMINN11&lt;/param-value&gt; &lt;/context-param&gt; </code></pre> <p>Also am I missing something?</p> <p><strong>Edit</strong>: I get the following exception:</p> <pre><code>javax.naming.NameNotFoundException: Name tomdb11 is not bound in this Context at org.apache.naming.NamingContext.lookup(NamingContext.java:770) at org.apache.naming.NamingContext.lookup(NamingContext.java:153) at org.apache.naming.SelectorContext.lookup(SelectorContext.java:137) at javax.naming.InitialContext.lookup(Unknown Source) at com.taw.database.DatabaseService.&lt;init&gt;(DatabaseService.java:19) at com.taw.database.DatabaseServices.init(DatabaseServices.java:40) </code></pre>