I am trying to register a db2 datasource in tomcat 5.5.4. However I get null when I do context.lookup in my java code.
This is what i have done
<GlobalNamingResources> <Environment name="simpleValue" type="java.lang.Integer" value="30"/> <Resource auth="Container" description="User database that can be updated and saved" name="UserDatabase" type="org.apache.catalina.UserDatabase" pathname="conf/tomcat-users.xml" factory="org.apache.catalina.users.MemoryUserDatabaseFactory"/>
Correct me if I'm wrong, but can't you use Tomcat's admin login tool to view a list of all data sources? After you have found it in the list, it should have the precise JNDI string that will load the application.