The Cache-Control header is set by processNoCache() method in
RequestProcessor as follows:
response.setHeader("Cache-Control", "no-cache");
With IE everything is fine. Hitting the back button works wonderfully and if
the previous request was a GET it would be "re GOTTEN" and if it was a
POST, it displays the "POST data has expired warning. U wanna resubmit?"
dialog.
However, for some other browsers, it doesn't quite work.
In Galeon and mozilla, regardless of whether the HTTP request was a POST
or a GET, hitting the back button shows the previous screen in its original
glory (not good).
I made a slight tweak and over-rode the processNoCache() method in
"my RequestProcessor" (which incidentally overrides TilesRP). Inside this
overriddent, I changed the Cache-Control setting to :
response.setHeader("Cache-Control", "no-cache,no-store,max-age=0");
This works fine.
Blog Archive
-
▼
2009
(17)
-
▼
April
(16)
- Use of ActionErrors in struts
- Anatomy of ActionForm
- Life Cycle of Struts Request
- Struts and MVC
- 10 Tips: How to Optimise Your Website in a Web 2.0...
- Struts or JSF? Struts and JSF?
- processNoCache() : Disables Back Button of All Bro...
- struts flow
- differences between bean:message and bean:write
- validate() and reset() methods
- validator-rules.xml and validation.xml files
- Struts - DynaForm validation
- What is difference between ActionForm and DynaActi...
- Creating Your own RequestProcessor
- Is Struts Thread Safe ?
- RequestProcessor in struts and how it works
-
▼
April
(16)
Thursday, April 2, 2009
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment