Meaningless Drivel is fun!
The moose likes Struts and the fly likes Form resubmit on Back Button Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Form resubmit on Back Button" Watch "Form resubmit on Back Button" New topic

Form resubmit on Back Button

Vani Bandargal
Ranch Hand

Joined: Oct 06, 2005
Posts: 82
We have a Struts application.
When I click on browser Back button, first I get a Security alert saying, "You are about to view pages over a secure connection ................." (the page I am on is also using protocol https and the page I am going to hit using the Back button also uses https: protocol and all these pages arr part of the Struts aplication). If I say yes , I get Page Expired warning and to get the page it asks to Refresh the page.
If I refresh, the form will be resubmitted and creates duplicate record which I do not want.
Any idea what is going on? Any help/suggestions are appreciated.
Pavan Tummala
Ranch Hand

Joined: Dec 25, 2004
Posts: 74
I think u should disable caching of pages by setting the appropriate response headers. I am not sure if it will solve ur problem. It solves a lot of issues with back button.

If Java had true garbage collection, most programs would delete themselves upon execution -- Robert Sewell
Vani Bandargal
Ranch Hand

Joined: Oct 06, 2005
Posts: 82
Thank you Pavan.

1.The strange thing is,it happens only for few pages and not for all within the application in given machine.
2. Why it is saying that I am leaving the secure connection?(for few pages) even though they are all on same server infact all these pages are part of one application?
3.If it is to do with secure/non secure mode, why it happens only on few machines even after going through proper authentication

Thank in advance
[ October 20, 2005: Message edited by: Vani D Bandargal ]
Pazhamalai Nathan G

Joined: Oct 24, 2005
Posts: 1
Dear Vani,
Go to View> Source for the corresponding jsp page.
And make sure that all url starts with httpsnot http.

Thanks and regards,
I agree. Here's the link:
subject: Form resubmit on Back Button
It's not a secret anymore!