tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andreas Mohrig <andreas.moh...@cadooz.de>
Subject RE: MVC and caching
Date Thu, 29 Aug 2002 10:50:19 GMT
Either the browser or some proxy is caching your page. Try to tell them to
not do that with either a http-header:

response.addHeader("pragma","no-cache");  [I hope this is right]

or some HTML-Tags (pick one or use all, I haven't tested them or checked for
compliance with the HTML-Standard; just found them on the web):

<META HTTP-EQUIV="cache-control" CONTENT="no-cache">
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="expires" CONTENT="Tue, 7 July 1998 10:00:00 GMT">

The header seems to be preferable, since proxies might ignore the tags. Let
us know if you succeeded and if so, with what method.

Andreas Mohrig

-----Original Message-----
From: Anthony Geoghegan [mailto:antg@eircom.net]
Sent: Thursday, August 29, 2002 12:18 PM
To: Tomcat Users List
Subject: Re: MVC and caching


Is that a client caching issue?
If so a variety of http header settings can be used to clear a client-side
cache.

Best Regards,
Anthony Geoghegan.
J2EE Developer
CPS Ireland Ltd.
----- Original Message -----
From: "Josh G" <josh@gfunk007.com>
To: "Tomcat Users List" <tomcat-user@jakarta.apache.org>
Sent: Thursday, August 29, 2002 1:06 AM
Subject: MVC and caching


Hi, I'm using a model-view-controller setup for my application, and I've run
into problems with caching - here's a workflow:

1. User gets presented with viewDetails.jsp?id=1
2. User updates details, submits forms to a controller servlet
3. Servlet commits the changes via the model objects, and redirects to
viewDetails.jsp?id=1
4. ???
5. Profit!!!

The problem is, the user is seeing (sometimes) a cached version of
viewDetails.jsp?id=1.... not always mind, just most of the time.

Anybody run into similar problems? Is there a simple solution? Perhaps
adding
a variable with random data in it?

Any answers appreciated!

--
To unsubscribe, e-mail:
<mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail:
<mailto:tomcat-user-help@jakarta.apache.org>



--
To unsubscribe, e-mail:
<mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail:
<mailto:tomcat-user-help@jakarta.apache.org>

--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>


Mime
View raw message