That's what the invocation.invoke() method returns.  It's either the result
name from the action, or one of the interceptors that took control (after
your interceptor).  Either way, it's the result that will be used to return
the result.
  (*Chris*)


On Mon, Jun 10, 2013 at 9:29 PM, JOSE L MARTINEZ-AVIAL <jlm...@gmail.com>wrote:

> Actually, what I want is to get the result name returned by the action, not
> the action name. Is there a simple way I can access the result from the
> JSP?
>
>
> 2013/6/11 Lukasz Lenart <lukaszlen...@apache.org>
>
> > 2013/6/10 JOSE L MARTINEZ-AVIAL <jlm...@gmail.com>:
> > > Hi,
> > >
> > >    I have an action where all the possible results show the initial
> > screen.
> > > I do that by using a "*" result
> > >
> > >         <action name="DoPublishDocument" class=
> > > "xxx.yyy.zzz.PublishDocument">
> > >             <interceptor-ref name="my-stack">
> > >             <result name="*"
> > > type="tiles">customer.publish-document.screen</result>
> > >         </action>
> > >
> > >  But I would like to do some distinction in the underlying JSP between
> > the
> > > diferent results, and for that I need to get the action result from the
> > > JSP. Is there an easy way to get it?
> >
> > I think there isn't a simple way. You must write an interceptor which
> > will set action name on the action, ie.
> >
> > public String intercept(ActionInvocation ai) {
> >     Object action = ai.getAction();
> >     if (action instanceof ActionNameAware){
> >
> > ((ActionNameAware)action).setActionName(ai.getProxy().getActionName());
> >     }
> > }
> >
> >
> > Regards
> > --
> > Ɓukasz
> > + 48 606 323 122 http://www.lenart.org.pl/
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> > For additional commands, e-mail: user-h...@struts.apache.org
> >
> >
>

Reply via email to