• 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

Action Chaining issue

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

I am doing a action chaining. I have my scope as session in both the action mappings of action classes. I set few properties(5 values) in action 1 before sending to action 2. In action 2 I couldn't see few property(2 values) values. Then I set those 2 values in request attribute in action 1 and received in action 2.

Later I had a requirement where we aren't supposed to use request attributes. I used redirect attribute of forward tag.

<forward name="abc" path="/app/xyz.do" redirect="true"/>

I started getting the values of those 2 properties without request attributes. As I understand redirect kills all request attributes/parameters. But couldn't understand how redirect attribute is setting the value of those 2 attributes.
 
Ranch Hand
Posts: 948
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You are getting the values in Action 2 from the form? I would think that since your form is configured to use session scope then any values that were populated on the form in Action 1 would stick around for Action 2. I know there are some odd issues with Struts when you chain together action and how it populates the form (that is without using redirect="true" and I am not sure how it plays with session scoped forms).

- Brent
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic