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 > >