tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anand HS <>
Subject Re: Tomcat cleaning up work folder by itself
Date Mon, 01 Feb 2010 23:36:28 GMT
One of the property files is called
here is how it is loaded -

ClassLoader cl = Thread.currentThread().getContextClassLoader();  url = cl.getResource("");
System.out.println("url available"+(null!=url));

When the server first starts all is well.
However, after some time ( arbitrary amounts ) tomcat , the above SOP starts
printing url available = false which indicates the resource file is not
And when I check the work\_\loader folder, I see this resource file is
indeed missing.

I was checking the documentation of <Context> element and it specifies
several attributes cacheMaxSize, cacheObjectMaxSize, cacheTTL etc..
However, Im not clear if these related to the content stored in work

Im going with the thought process of some how the cache size overflowing and
hence the static resource ( i . e under work folder being deleted. ) . Am i
Close. ?


On Mon, Feb 1, 2010 at 3:28 PM, Caldarale, Charles R <> wrote:

> > From: Anand HS []
> > Subject: Re: Tomcat cleaning up work folder by itself
> >
> > My webapp ( abc-web ) is located outside the Tomcat.
> That's good, and I don't see anything amiss in your server.xml.  I think
> we're back to how you reference these property files.  Tomcat is under no
> obligation to keep them around in the work directory, or even to put them
> there in the first place.  Using the getResourceAsStream() methods is the
> proper way to retrieve them.
>  - Chuck
> MATERIAL and is thus for use only by the intended recipient. If you received
> this in error, please contact the sender and delete the e-mail and its
> attachments from all computers.
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message