Agreed, but there are all sorts of posts on the list about JSPs not getting updated after they are changed, and I've seen the behavior myself on occasion, especially with older Tomcat versions. Consider it a failsafe. Since best practice is that Tomcat is rarely restarted, it really isn't going to hurt much, if at all. Maybe I'm too old school, but I feel better being able to guarantee that I am starting from scratch when needed instead of crossing my fingers and hoping someone, somewhere, coded something correctly that, if incorrect, might cause me to spend an hour or two tracking it down.


John

On Wed, 2 Apr 2003 15:44:44 -0500, Shapira, Yoav <[EMAIL PROTECTED]> wrote:


Howdy, Don't rush into this clearing out the work directory thing.

Tomcat is responsible for its use of the work directory.  It will copy
files, e.g. jsp's, there as needed.  It will compile them there as
needed.  It is responsible for noting that you've deployed a new JSP and
re-compiling it, overwriting the older version in the work directory.

If you clear the work directory every time you stop the server, you will
lose the compiled JSPs, resulting in a performance loss next time you
start the server, even if the JSPs have not been modified.

You should clear the work directory if:
- You really need to free up disk space and have tons of contents in the
work directory
- You frequently discard JSPs altogether, so you don't need their
compiled versions at all

Otherwise, it's pretty much a "don't worry about it" aspect of tomcat.
Consider it kind of like the windows temporary directory.

Yoav Shapira
Millennium ChemInformatics


-----Original Message-----
From: Erik Price [mailto:[EMAIL PROTECTED]
Sent: Wednesday, April 02, 2003 3:40 PM
To: Tomcat Users List
Subject: Re: work dir



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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]




This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you.


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]





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

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to