Help coderanch get a
new server
by contributing to the fundraiser
  • 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 ...
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
  • Mikalai Zaikin

ExecAndWait interceptor parameters lost

Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

I have an issue in my code that I can't resolve and I would appreciate your help.
I am using the struts2 execAndWait interceptor when I submit a form on my site.
Below is the relevant struts.xml snippet

The problem I have, is that when I submit my form via POST and produce
some results then if I try to refresh the results page (results.jsp) those data previously
send via POST do not exist anymore, so I'm redirected to the wait page and
finally because data do not exist to an error page (that does not happen in
Firefox where data somehow are preserved in refresh). Obviously data are erased
the first time the wait page is auto-refreshed. FYI here is a simplified version
of my wait.jsp

I could solve this problem by using includeParams="all" in s:url (as seen above) when
refreshing wait page but then the data are seen in the URL (aside the fact that there is
a ton of data).Also, when data are not latin characters then after the first refresh the
character encoding in URL fails, so cannot be used later for repeating the request with
refresh (e.g. ProcessTripForm.action?originCity=Ηράκλειο is becoming after the first
refresh ProcessTripForm.action?originCity=%26%23xCE%3B%26%23x97%3B%26%23xCF%3B
%26%23x81%3B%26%23xCE%3B%26%23xAC%3B and continues to expand).

My question is how can I preserve data when I use the execAndWait interceptor and use a
POST request in a way that when I'm on result page and hit refresh the same request will
be repeated?
If that is not possible, and I have the data on my URL via GET and includeParams then what
do I have to do so encoding does not fail ?
It's just like a fortune cookie, but instead of a cookie, it's pie. And we'll call it ... tiny ad:
We need your help - Coderanch server fundraiser
    Bookmark Topic Watch Topic
  • New Topic