You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Pedro Morais <pm...@rnl.ist.utl.pt> on 2001/10/10 14:26:40 UTC

Bug or feature: context workDir

Hi!
I'm trying to move a context work dir out of CATALINA_HOME.
The context only has a war file which has one jar inside.

Here's a fragment of my server.xml:

     ...
     <Host name="localhost" appBase="" unpackWARs="false">
        <Context path="" docBase="web/cutgest-admin.war" workDir="/tmp/adm"/>
      </Host>
     ...

I've set workDir to /tmp/adm (just for testing, I know it's bad securitywise).
Also, unpackWARs is set to false. Now, in tmp/adm i get

# find /tmp/adm
/tmp/adm
/tmp/adm/WEB-INF
/tmp/adm/WEB-INF/lib
/tmp/adm/WEB-INF/lib/cutgest-admin.jar

That's ok, that's what the following log entries were telling me:
...
2001-10-10 13:09:26 WebappLoader[]: Deploying class repositories to work 
directory /tmp/adm
2001-10-10 13:09:26 WebappLoader[]: Deploy JAR /WEB-INF/lib/cutgest-admin.jar 
to /tmp/adm/WEB-INF/lib/cutgest-admin.jar
...

Now in CATALINA_HOME, no "work" directory appears.
That's ok, since I don't want it to appear.

Now, let's change the workDir just to adm; 
(CATALINA_HOME is in build/web/admin)

#find build/web/admin/adm/
build/web/admin/adm/
build/web/admin/adm/WEB-INF
build/web/admin/adm/WEB-INF/lib
build/web/admin/adm/WEB-INF/lib/cutgest-admin.jar

Now, the strange part:
#find build/web/admin/work/
build/web/admin/work/
build/web/admin/work/localhost
build/web/admin/work/localhost/adm

workDir gets created both on CATALINA_HOME/work/localhost and
CATALINA_HOME, but only the last one is used.

Bug?

Thanks.