tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dennis Thrysøe <...@geysirit.dk>
Subject Re: Delay / caching of resources?
Date Wed, 07 Jan 2009 14:11:10 GMT
On 7Jan, 2009, at 10:40, Dennis Thrysøe wrote:
> Hi,
>
> I have a tomcat 6 setup on linux (CentOS 5) and see some odd  
> behaviour.
>
> There are some JSP's that include (in a custom tag with  
> pageContext.include()) static HTML resources that are in the webapp.
>
> However, when such HTML files are added or modified to the webapp  
> (exploded directory) it takes something like 5 or 10 seconds before  
> they can be served by tomcat.
>
> Direct access to the filesystem sees the new file but tomcat says  
> that the resource cannot be found. When modifying a HTML file tomcat  
> keeps serving the old version for some seconds.
>
> The same seems to be a problem for images which are added to the  
> webapp at runtime. These are requested directly (not included  
> obviously).
>
> Changing the "modificationTestInterval" for the JSP servlet does not  
> seem to have effect. (And the HTML is not served by the JSP servlet  
> anyway, right?)


I have now found a potential explanation with the help of a good  
debugger: StandardContext.setCacheTTL()

This method seems to be altering the TTL of the context cache  
(ProxyDirContext via BaseDirContext) that is used by DefaultServlet  
which is serving my HTML files )from the default 5 seconds).

I am, however, unable to find any configuration that can be used to  
control this caching? I am interested in getting the latest file  
version always.

Otherwise I might need to implement serving of static resources in a  
servlet myself?


Thanks,

-dennis

--
Geysir IT
dth@geysirit.dk
http://geysirit.dk
+45 31 51 60 00


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


Mime
View raw message