This week's book giveaway is in the Cloud/Virtualization forum.
We're giving away four copies of Cloud Application Architecture Patterns: Designing, Building, and Modernizing for the Cloud and have Kyle Brown, Bobby Woolf and Joseph Yodor on-line!
See this thread for details.
  • 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
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

ExecAndWait interceptor parameters lost

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

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 ?
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic