You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Konstantin Kolinko <kn...@gmail.com> on 2014/02/03 23:26:31 UTC

Re: Work & temp queries-tomcat 6

Two corrections to what Chris wrote

2014-01-30 Christopher Schultz <ch...@christopherschultz.net>:
> On 1/30/14, 12:53 PM, vicky007aggarwal@yahoo.co.in wrote:
>> how work & temp is being used by a Tomcat ??
>
> The temp dir is required by the servlet spec. I don't believe Tomcat
> uses it for anything. The work directory is used to cache resources
> from WAR files, to compile .jsp files into .java and ultimately .class
> files, etc.
>

The "work" directory is created automatically.

The "temp" directory is not created automatically (to my surprise).

The "temp" directory is just the value that is configured by default
for "java.io.tmpdir" system property by Tomcat startup scripts.

Tomcat code itself does not use this directory, but 3rd party
libraries or JRE may use it.

If "temp" directory does not exist, the following is logged:

... SEVERE [main] org.apache.catalina.startup.Catalina.initDirs Cannot
find specified temporary folder at <catalina.base path
redacted...>\temp

>> The temp dir is required by the servlet spec.

That is a different one. The temporary directory per servlet spec that
is ServletContext.getAttribute(ServletContext.TEMPDIR) is different
for each web application.

In Tomcat those are at work/<Engine name>/<Host name>/<webapp name>

Best regards,
Konstantin Kolinko

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