You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Erik Price <ep...@ptc.com> on 2003/04/02 20:51:52 UTC

work dir

I just noticed that there are older *.java and *.class files in my 
hosts's $CATALINA_HOME/work/ directory, that I have long since removed 
from my webapp directory (and there have been a number of stops and 
starts of both my webapp and Tomcat itself since then).

When do these files get cleared out?  Or, rather, is there a document 
that discusses the work directory a bit more?

Thanks,


Erik


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: work dir

Posted by Erik Price <ep...@ptc.com>.

John Turner wrote:
> 
> I wouldn't delete "work" itself...that will probably break things.
> 
> My scripts just have:
> 
> rm -rf /usr/local/tomcat/work/*
> 
> on stop.  That way, a startup is clean.  Tomcat will rebuild anything it 
> needs to build under "work".  That will slow things down the first time 
> through, however, as the cache is rebuilt.  If you have to stop/start 
> Tomcat often, there's probably something else wrong that should be 
> investigated and resolved.

Thanks John.  We have only had to restart Tomcat when adding a JAR to 
$CATALINA_HOME/common/lib and when we created my webapp.  I will suggest 
to my admin that the stop script be modified thusly.


Erik


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: work dir

Posted by John Turner <to...@johnturner.com>.
I wouldn't delete "work" itself...that will probably break things.

My scripts just have:

 rm -rf /usr/local/tomcat/work/*

on stop.  That way, a startup is clean.  Tomcat will rebuild anything it 
needs to build under "work".  That will slow things down the first time 
through, however, as the cache is rebuilt.  If you have to stop/start 
Tomcat often, there's probably something else wrong that should be 
investigated and resolved.

John

On Wed, 02 Apr 2003 15:02:51 -0500, Erik Price <ep...@ptc.com> wrote:

>
>
> John Turner wrote:
>>
>> I don't think Tomcat clears out the work directory on its own.  I've 
>> always had to write wrapper scripts for my instances that do a "rm -rf 
>> work/*" right before a call to startup.sh.
>
> Oh okay, I didn't realize that's how it's supposed to work.  No problem. 
> I also just noticed that the contents of the work directory are owned by 
> root, and I'm just a user on my friend's Linux server.  I'll just let him 
> know that if ever feels that the directory is getting too big he can 
> clean it out, or modify startup.sh to do so.
>
> Is it safe to assume that anything in $CATALINA_HOME/work will be rebuilt 
> by Tomcat (assuming the webapp starts normally and the "current" JSPs are 
> still present in the webapp's docroot)?  It's less trouble for him if he 
> just has to delete one directory ($CATALINA_HOME/work) instead of doing a 
> separate delete for every webapp.
>
>
> Thanks,
>
> Erik
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>



-- 
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: work dir

Posted by Erik Price <ep...@ptc.com>.

John Turner wrote:
> 
> I don't think Tomcat clears out the work directory on its own.  I've 
> always had to write wrapper scripts for my instances that do a "rm -rf 
> work/*" right before a call to startup.sh.

Oh okay, I didn't realize that's how it's supposed to work.  No problem. 
  I also just noticed that the contents of the work directory are owned 
by root, and I'm just a user on my friend's Linux server.  I'll just let 
him know that if ever feels that the directory is getting too big he can 
clean it out, or modify startup.sh to do so.

Is it safe to assume that anything in $CATALINA_HOME/work will be 
rebuilt by Tomcat (assuming the webapp starts normally and the "current" 
JSPs are still present in the webapp's docroot)?  It's less trouble for 
him if he just has to delete one directory ($CATALINA_HOME/work) instead 
of doing a separate delete for every webapp.


Thanks,

Erik


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: work dir

Posted by John Turner <to...@johnturner.com>.
I don't think Tomcat clears out the work directory on its own.  I've always 
had to write wrapper scripts for my instances that do a "rm -rf work/*" 
right before a call to startup.sh.

John

On Wed, 02 Apr 2003 13:51:52 -0500, Erik Price <ep...@ptc.com> wrote:

> I just noticed that there are older *.java and *.class files in my 
> hosts's $CATALINA_HOME/work/ directory, that I have long since removed 
> from my webapp directory (and there have been a number of stops and 
> starts of both my webapp and Tomcat itself since then).
>
> When do these files get cleared out?  Or, rather, is there a document 
> that discusses the work directory a bit more?
>
> Thanks,
>
>
> Erik
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>



-- 
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org