Re: dynamic forwarding from Action class to any url

2007-09-07 Thread Nils-Helge Garli
This might work: ${newPage} You might consider some sort of white list of internal resources that can be accessed to prevent misuse. Nils-H On 9/7/07, Mirbek Nosinov <[EMAIL PROTECTED]> wrote: > Is it possible to dynamicaly forward to any page from Action class execute() > function. For example

Re: dynamic forwarding from Action class to any url

2007-09-07 Thread Chris Pratt
> > Is it possible to dynamicaly forward to any page from Action class > > execute() Make your Action implement ServletResponseAware, then just use the response.sendRedirect() method to redirect to where you want to go. Then return null from your action to let Struts 2 know that you've handled thi

Re: dynamic forwarding from Action class to any url

2007-09-07 Thread Mirbek Nosinov
Yes it is correct for Struts 1, but i use Struts 2 2007/9/7, Gundersen, Richard <[EMAIL PROTECTED]>: > > I do it this way (create a new ActionForward with the url you want in > the Action method you are executing, and just return that instead of > doing mapping.findForward... > >

RE: dynamic forwarding from Action class to any url

2007-09-07 Thread Gundersen, Richard
I do it this way (create a new ActionForward with the url you want in the Action method you are executing, and just return that instead of doing mapping.findForward... ActionForward forward = new ActionForward(url); return forward; Richard Gundersen

Re: dynamic forwarding

2005-05-05 Thread Michael Jouravlev
If you know where to forward, you can create a custom ActionForward in runtime. ActionMapping.findForward() that everyone usually use, is just a convenience method. You can create your own instance of ActionForward class with whatever path and request method you like. Don't change ActionForward ins