aspose file tools*
The moose likes JSP and the fly likes Warning : Page Expired on clicking Back Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "Warning : Page Expired on clicking Back" Watch "Warning : Page Expired on clicking Back" New topic
Author

Warning : Page Expired on clicking Back

sreenath reddy
Ranch Hand

Joined: Sep 21, 2003
Posts: 415
Hi
I am facing a scenario which is popular across many web applications .. I have a form which submits a few fields on clicking a button . Submitting the form will take it to another view and clicking Back from there will give me the IE page saying Page Expired, Click refresh to submit again.

I know that its coming because of the form using POST method , but how can i avoid this is the best possible way ..

One solution which i am familiar is , after submitting use a redirect than forward so that URL gets updated as GET and clicking back won't cause any issues. IN this case i will be loosing the request varibles and thus it becomes tough to show the error messages

can any one let me know if there is a better solution ??
Stan James
(instanceof Sidekick)
Ranch Hand

Joined: Jan 29, 2003
Posts: 8791
I feel your pain on losing the request object. I have done this by putting the message on the URL of the redirect, but it shows in the address bar in the browser which may or may not be ok.


A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
srilatha kareddy
Ranch Hand

Joined: Jan 12, 2006
Posts: 32
i can suggest one thing....

u can control back button using javascript there u can write code

one trick is
javascript:window.history.forward(1);
[ March 01, 2006: Message edited by: srilatha reddy ]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60053
    
  65

srilatha reddy, JavaRanch is a community of people from all over the world, many of who are not native English speakers. While using abbreviations like "u" instead of spelling out "you" is convenient when text messaging your friends on a cell phone or in a chat room, it presents an extra challenge to those that are already struggling with English. Additionally, such shortcuts may confound automated translation tools that patrons of the Ranch may be making use of.

I would like to ask for your help in making the content of JavaRanch a little easier to read for everybody that visits here by not using such abbreviations.

Please read this for more information.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
sreenath reddy
Ranch Hand

Joined: Sep 21, 2003
Posts: 415
Hi stan

I appreciate your suggestion but any other better way for doing that as it will expose the error message in the URL
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Warning : Page Expired on clicking Back
 
Similar Threads
problem in execution of onClick of image
session handling
How to open report builder form(oracle) while clicking the jsp page(Online) link
Post Production Problem ActiveX JavaScript - Urgent!!
web browser internal