Click to See Complete Forum and Search --> : Declaring a JNDI Resource for the default Tomcat Application


goon12
03-21-2005, 10:55 PM
I have a test webserver here, and I have created a simple JSP/Servlet web application.( I'm using Tomcat-5.0.28 as the container ). I access my application using something like "http://mybox/TheApp", the application is located at $CATALINA_HOME/webapps/TheApp. Everything works fine, even connecting to the database, which is done using a JNDI resource defined in the $CATALINA_HOME/conf/server.xml file. I want my application to be the default application, so I tried to move TheApp dir to ROOT. The application loads up fine, except for the database connection. So in my $CATALINA_HOME/conf/server.xml file I edited the <Context /> tag's attributes ( path and docbase ). I tried them as "/ROOT" and "/" but neither worked. How can I allow the default application ( /ROOT ) to access the JNDI resource? Or can I have Tomcat look else where for the default application?

Thanks,
goon12.

PS - I have been googling for a while, and I read the Tomcat docs, but they are not very specific.