File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes Unable to clear the cache Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Unable to clear the cache" Watch "Unable to clear the cache" New topic

Unable to clear the cache

maganti suryanarayana
Ranch Hand

Joined: Mar 30, 2010
Posts: 53

I am developing a new web app for registering a customer.

My struts.xml is as follows:

My tiles.xml is as follows:

My validations for the input fields like customer name, age , mail, telephone are working perfectly and i am using Action-Validation.xml for it.

The problem is that when ever i am entering incorrect details and hitting the submit button is giving me the errors in the same page as result name="input" i have redirected to the customer.jsp. Its working good.
But when all the fields are given correctly and submit button is hit the data is stored in database. Thats also good. When i press back arrow in the browser, i can able to see the data which i dont want to see after successful
submit. For this i have written a interceptor called response cache which will set the headers as nocaceh, expires to 0 , etc etc.

How can i show the empty fields when i hit the back button of the browser

thanks & regards


Yogesh Lonkar
Ranch Hand

Joined: Jul 17, 2012
Posts: 94

I am not sure this is good solution or not but i did some thing like this to prevent page from going back

Learning some thing New Every Day
I agree. Here's the link:
subject: Unable to clear the cache
It's not a secret anymore!