I haven't tried myself but the annotations for results should work just
like regular xml-configured results.
musachy
On 5/9/07, Caine Lai <[EMAIL PROTECTED]> wrote:
Thanks Musachy,
But how would one do this if they were using Struts 2 annotations to map
their action classes? Is it possible? Or am I stuck with using XML for
this one action?
Thanks,
Caine
On 5/9/07, Musachy Barroso <[EMAIL PROTECTED]> wrote:
>
> You can use OGNL expressions in the result path, just make sure that you
> use
> ${expression}, instead of %{expression}, like
>
> <action ...>
> <result>${forwardTo}</result>
> </action>
>
> musachy
>
> On 5/9/07, Caine Lai <[EMAIL PROTECTED]> wrote:
> >
> > Does anyone know how I can forward to a .jsp file based on a dynamic
> > attribute (request parameter)?
> >
> > I want to write a Struts 2 action that will forward the user to a .jsp
> > dynamically. The flow works like so:
> >
> > 1. A request is made for 'resourceLocator.action?resource=common'.
> > 2. The resourceLocator.action class takes the 'resource' request
> parameter
> > and forwards the user to 'common.jsp'.
> >
> > I'm not able to figure out how this is done in Struts 2, since all
> actions
> > only return a String result which must be mapped. I'm trying to avoid
> > having to map all my resources in this action.
> >
> > Thanks!
> >
>
>
>
> --
> "Hey you! Would you help me to carry the stone?" Pink Floyd
>
--
"Hey you! Would you help me to carry the stone?" Pink Floyd