Just disable the Back button via Javascript:
<script Language="Javascript">
if (window.history.length > 0) history.forward();
</script>
> -----Original Message-----
> From: A mailing list about Java Server Pages specification and reference
> [mailto:[EMAIL PROTECTED]]On Behalf Of hua ge
> Sent: Wednesday, November 01, 2000 12:25 PM
> To: [EMAIL PROTECTED]
> Subject: trouble with the back button if I use session variable
>
>
> hi,
>
> I have a jsp search page searchForm.jsp, the commit button will invoke a
> servlet which going to implement the bussiness logic and store the result
> object in a session object named "geCollection", then this servlet will
> redirect to the result.jsp page and display the results based on the value
> stroed in the session variable "geCollection".
>
> the result.jsp display for the first search is fine.
> the result.jsp has a begin a new search link, if I do a new search, the
> result.jsp for the new search is also fine.
>
> the PROBLEM is after I saw the result from new search, if I go
> back with the
> browser back button to find the previous search result, I noticed that the
> previous results page showing the same as the new search results.
>
> I realized that the reason is everytime the servlet is invoked,
> it going to
> store the new results in the session object geCollection . on the
> result.jsp page, it will retrive out data from geCollection. so
> the new data
> will overwrite the old one.
>
>
> I play around with some website like "www.dice.com", it does not have this
> problem. I'd like to know what is the good way to avoid the above bug
> happens???
>
> anyone has some suggestion?
> higly appreciated.
>
>
> Helen
> _________________________________________________________________________
> Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
>
> Share information about yourself, create your own public profile at
> http://profiles.msn.com.
>
> ==================================================================
> =========
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> JSP-INTEREST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
> http://java.sun.com/products/jsp/faq.html
> http://www.esperanto.org.nz/jsp/jspfaq.html
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
>
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets