Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » Apache Tomcat »

Physical path outside of webapps directory

Ritchie Gillam

2006-03-29


Hi all

I have searched the archives and has seen many posting on this but
still need more information.

Right now, I use Eclipse as my IDE. When a project is ready for
testing I export to a WAR and use Tomcat's GUI Manager "WAR file to
deploy" option to deploy my application to my server.

So far, I have been setting up a context.xml file under META-INF in
which I don't specify a path or docBase. This works and as expected the
application deploys under the webapps folder (the default).  

What do I have to do to have the application reside in a physical
directory outside of webapps, for example, /data0/tomcat/home. Make
changes to the existing context.xml? Do I have to remove this xml and
create it under CATALINA_HOME/conf/Catalina/localhost with the name of
the app?

My understanding is that if I add the docBase attribute specifying a
physical directory that should be all that is required but in both cases
above this do not work. Maybe it is because I can't simply deploy using
the Tomcat Manager the way I use to do it.

Sample of testApp.xml below

<Context debug="0"  antiResourceLocking="false"
antiJARLocking="false"  reloadable="true"
docBase="/data0/tomcat/home">
     <Resource name="jdbc/hrm"
            auth="Container"
            type="javax.sql.DataSource"
           ...
     />
</Context>

Any help is greatly appreciated.

JDK 1.5
Tomcat 5.5.7
Sun Solaris 9

Ritchie
Programmer Analyst





---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@(protected)
For additional commands, e-mail: users-help@(protected)

©2008 junlu.com - Jax Systems, LLC, U.S.A.