Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Clearing data when back button is used

Status
Not open for further replies.

smithy4282

Programmer
Feb 22, 2007
5
US
I have a several JSP pages that help create a report. The first page you choose some options using check boxes. The second page you put those options in a certain order. The last page you choose the data you want to search for and it runs the report. The second and the last pages have a back button. The problem is when you use the back button and change some of your choices the old choices don't always go away. What I need to do is erase the previous choice (which are contained in an array) when the back button is clicked.

One problem is that the array is declared in a different method than the one that determines what happens when the back button is pressed.
 
You need to use a <meta> tag to not use a cache:


Add this to the top of each page you don't want values kept in
Code:
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Expires" CONTENT="-1">


[small]"I see pretty girls everywhere I look, everywhere I look, everywhere I look. - Band song on movie "The Ringer"[/small]
<.
 
Didn't work. I don't believe the way it stores data has to do with a cache. It puts the data into two arrays but I'm not even sure clearing them would help the issue. It just needs to get rid of the old data wherever it may have put it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top