Identifying Redirect/Forward Action in Struts2 Incerceptor -
i looking way identify struts 2 actions of type 'redirect/forward' in interceptor, can add common code particular type of action.
is there way in struts2 find type of action is?
thanks in advance.
there nothing called redirectaction or forwardaction, need redirect result type.
in interceptor have instance of actioninvocation passes intercept method, can result actioninvocation object , check per use case. different results listed here
public string intercept(actioninvocation actioninvocation) { //after invoking action can result of actioninvocation. result result = actioninvocation.getresult(); //as per use case can check against different types. }
Comments
Post a Comment