FORM Submit and going back?

Hi,

Whenever I have a jsp page generated by a Form submit and from that page if I go to another page and then hit the back button to go back to the previous page, IE gives me an error saying that the previous page was generated by submitting a form and due to security reasons, IE can't submit the form for me. So I have to hit the refresh button and then say retry to get to the page.

Is there anyway of avoiding it so that if the user clicks the back button, the form is automatically submitted and page is generated. I am using Method= "POST". Wasn't sure if it was a jsp problem or a form submit problem.

Please help.

Thanks.

KM

LVL 1
kmahmoodAsked:
Who is Participating?
 
gpeeraerConnect With a Mentor Commented:
Split your POST-handler in two.

First you handle your POST to the server. As last action, instead of generating HTML, redirect to a second page that generates the intended HTML.

The browser POST the information and gets a redirection back. It then GETs the second page. If you go further and hits the back button, you normally get back to the second page avoiding the POST.

Hope this helps

geert peeraer

0
All Courses

From novice to tech pro — start learning today.