Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Page expires using history.back

 
Andy Deighton
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I'm sure this has been covered LOTS of times, but I'm finding it hard to get a Struts-related answer to this.
I have a form (mapped to an ActionForm). It gets submitted and a page is displayed with the results. I want to let the user go back to the form and AMEND their input and re-submit. Now, it's easy to hit the Back button, but this produces a page expired message generated by the browser. I know I should really have an action that re-displays the form jsp, with the ActionForm instance that is still in the session. However, this doesn't seem to work either.
Is there a definitive solution for allowing an ActionForm to be re-displayed without the page expired error coming up (even if the user has to use a link, rather than hit the Back button)? Any help would be greatly appreciated.
Andy
UK
 
Mokriy Mokriy
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!
I have the same problem. Have you found some solution for that?
Or can anybody help with it?

thanks
 
tukai chakraborty
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
After successful completion of ur logic in ur Action class u can forward it to the same jsp from which u submitted.

Say in ur struts-config.xml u have
<action name="LoginForm" type="LoginAction" input="/Login.jsp" scope="request" path="/LoginAction">
<forward name="sucess" path="/Login.jsp" />
</action>

Now from ur Action Class u have to do
return(mapping.findForward("another")); which will take to ur jsp page and then do necessary upadtes again.

hope it soves ur problem
 
Sunil Manheri
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Also you can do like this fron your Action class:
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic