jodd.servlet
Interface ActionFilter


public interface ActionFilter

ActionFilter implementation is used by ActionController. It intercepts all actions, so filter will be called before and after the action invokation.

Filter also may chnage the default behaviour of the mapped action. Therefore, it may be used for managing security access in the application etc.


Method Summary
 java.lang.String onAction(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, ActionServlet action)
          Called BEFORE some action is invoked.
 java.lang.String onAfterAction(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, ActionServlet action, java.lang.String actionResult)
          Called AFTER some action is invoked.
 

Method Detail

onAction

public java.lang.String onAction(javax.servlet.http.HttpServletRequest request,
                                 javax.servlet.http.HttpServletResponse response,
                                 ActionServlet action)
Called BEFORE some action is invoked. It may return null for letting the Controller to invoke the mapped action or it may return a forward instead of action.

Parameters:
request - http request
response - http response
action - action class that is going to be invoked
Returns:
null for invoking the action, otherwise the forward string

onAfterAction

public java.lang.String onAfterAction(javax.servlet.http.HttpServletRequest request,
                                      javax.servlet.http.HttpServletResponse response,
                                      ActionServlet action,
                                      java.lang.String actionResult)
Called AFTER some action is invoked. It may return null for letting the Controller to process the returned results of the action or it may return a forward string that will be override returned results.

Parameters:
request - http request
response - http response
action - action class that is going to be invoked
actionResult - result of invoked method
Returns:
not-null for overrinding returned action result


Jodd v0.24.5 Javadoc