Hello all,
we are using Apache Tomcat 5.5.16 on both a Windows (development) and
Linux (production) system. Caching of static resources works fine but we
should control the behavior. We use a filter, which transforms static
xml files and inserts some data.
The access log shows clearly that all static resources are cached.
127.0.0.1 - don [18/Jan/2007:00:04:58 +0100] "GET /hospi2007/index.xms?
HTTP/1.1" 304 -
127.0.0.1 - don [18/Jan/2007:00:04:58 +0100] "GET
/hospi2007/stylesheet.jsp? HTTP/1.1" 200 1429
127.0.0.1 - don [18/Jan/2007:00:04:58 +0100] "GET /hospi2007/leftbg.gif?
HTTP/1.1" 304 -
The XSLT filter did manipulate the xml content from the "index.xms" but
of course nothing shows up in Mozilla 2.0.0.1. Better said: it did not
manipulate anything because the writer (a char buffer) of the wrapped
response does not contain anything. (By the way. With the latest IE it
is nothing caching at all and everything works as expected).
Don't worry about our special filter implementation. The caching appears
already with simple HTML pages which does not pass the filter:
127.0.0.1 - don [18/Jan/2007:00:26:31 +0100] "GET /hospi2007/index.html?
HTTP/1.1" 304 -
And exactly here we would like to disable the caching.
Meta tags did not help:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<META content="no-cache" http-equiv="pragma" >
<META content="no-cache, must-revalidate" http-equiv="Cache-Control" >
<META content="0" name="Expires" >
<title>Hello World</title>
</head>
<body>
<h1>Hello World</h1>
</body>
</html>
Context configuration did not help neither:
<Context cacheMaxSize="1" cacheTTL="1" cachingAllowed="false"
reloadable="true">
We thought about changing the request header "if-modified-since"
somewhere in the XSLT filter, but did not find a way to do this.
We thought even about to substitute the static xml pages with jspx
pages. This works fine, but we got problems with the "&" entity. Jsp
substitutes the entities with "&" which breaks the XML.
Any suggestion for a clean and simple solution?
Regards
Stefan
--
Stefan
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]