top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

Access result name from JSP

0 votes
58 views

I have an action where all the possible results show the initial screen. I do that by using a "*" result

customer.publish-document.screen

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?

posted Jun 10, 2013 by anonymous

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

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());
 }
}
answer Jun 11, 2013 by anonymous
...