• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Page expires using history.back

 
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Also you can do like this fron your Action class:
 
reply
    Bookmark Topic Watch Topic
  • New Topic