You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Daniel Ruan <da...@gmail.com> on 2007/05/03 06:21:02 UTC

[S2] Action Forward?

I come from the Struts 1 world, and am trying to find out how to do this
properly in Struts 2.

This is a common issues. Let's say we have a Web site that has both
protected (needs login) and public resources.  If users click a link to a
protected resource, the site will direct users to log in; then upon success,
send users to where they came from (another redirect).

I found an example of passing dynamic redirect parameters,  like this:

    <result name="redirect" type="redirect-action">
        <param name="actionName">displaySalesOrder</param>
        <param name="namespace">/order/sales</param>
        <param name="parse">true</param>
        <param name="id">${order.id}</param>
    </result>

But in my case, everything is dynamic for the logon success redirect! That
includes action name, name space, number of parameters, name of parameters,
parameter values or OGNL expressions.

Any ideas?

Thanks in advance!

/daniel