Dennis Thrysøe wrote:
> 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?

http://tomcat.apache.org/tomcat-6.0-doc/config/context.html

Look for cachingAllowed

Mark

> 
> 
> Thanks,
> 
> -dennis
> 
> -- 
> Geysir IT
> d...@geysirit.dk
> http://geysirit.dk
> +45 31 51 60 00
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
> 



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

Reply via email to