Hi Criss,
thanks for your reply.

I know the global result, but is unusefull for this purpose. The problem is
that the actions that i want to call is knew at runtime cause the
interceptor at init time scan classes with certain annotations and i want to
forward to those actions so i can't put the result in struts.xml because i
can't know what action to call.

So my question is: the only way for an action to redirect to another action
is via redirect-action-result ? like described in:
http://struts.apache.org/2.x/docs/redirect-action-result.html
Maybe putting in the annotation the information to call the action i want
....

--
Stefano Corallo


On Wed, May 27, 2009 at 9:07 AM, Chris Pratt <thechrispr...@gmail.com>wrote:

> Sort of.  The way that I've achieved something similar to what you seem to
> be asking is to define a bunch of Global Results in struts.xml that define
> common actions that the interceptors may need to invoke (like
> reset-password
> or invalid-input), then instead of chaining to the action in the
> interceptor, just return the name of the global result and you've
> effectively called that action.
>  (*Chris*)
>
> On Tue, May 26, 2009 at 11:53 PM, Stefano Corallo <stefan...@gmail.com
> >wrote:
>
> > Hi all,
> >
> > can an interceptor call an arbitraty action different from the action
> > requested by the client?
> >
> > Suppose i've the interceptor "interceptor-router" placed in the stack and
> > the client call MyAction.action, when the interceptor intercept the call
> is
> > possible to 'redirect' the call to MyDifferentAction.action from the
> > interceptor?
> >
> > I've seen that there is action chaining but this require to know at build
> > time the name of the actions i want to redirect to, but i know the name
> > only
> > at runtime and
> >
> >
> > I hope i was clear :) sorry for my english.
> >
> >
> > --
> > Stefano Corallo
> >
>

Reply via email to