Another method I once noticed has to do with never letting your user request the exact same URL twice, which could be accomplished by always sending (and incrementing) an additional sequence-number:
1. User gets presented with viewDetails.jsp?id=1&sequencenumber=<A_NUMBER> 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&sequencenumber=<A_NUMBER+1> 4. ??? 5. Profit!!! [hopefully!] This can't be cashed, since it has to be expected that the output based an the different input will also be different. greetings Andreas Mohrig -----Original Message----- From: Andreas Mohrig [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 29, 2002 12:50 PM To: 'Tomcat Users List' Subject: RE: MVC and caching 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:[EMAIL PROTECTED]] 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" <[EMAIL PROTECTED]> To: "Tomcat Users List" <[EMAIL PROTECTED]> 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:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
