Joachim Ansorg wrote:
Hi all,
I have two actions (action1 and action2) which both call a third action.

How can I do the mapping of the third action so that the calling action is called again (i.e. action1 or action2)?

Before action1 or action2 finishes, store its name in one of the scopes (request, session, etc).

Then, when you write your results mapping (in struts.xml) for action3 you can refer to that stored value using OGNL. Something like this...

<result name="success" type="redirect">
  <param name="location">${#session.lastActionName}.action</param>
</result>

(The example above assumes you used the session scope for storage and that you associated a String with the key "lastActionName".)

At least that's the by-hand way. For WebWork I had written a "BoomerangInterceptor" to automate all that. Maybe with S2 there's a built-in interceptor that does this now?

- Gary

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to