actionfilter.java
来自「Jodd是一个开源的公用Java基础类库」· Java 代码 · 共 47 行
JAVA
47 行
package jodd.servlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
/**
* ActionFilter implementation is used by ActionController. It intercepts all
* actions, so filter will be called before and after the action invokation.
* <p>
*
* Filter also may chnage the default behaviour of the mapped action.
* Therefore, it may be used for managing security access in the application etc.
*
* @author Weird
*/
public interface ActionFilter {
/**
* Called BEFORE some action is invoked. It may return <code>null</code> for letting the
* Controller to invoke the mapped action or it may return a forward instead of action.
*
* @param request http request
* @param response http response
* @param action action class that is going to be invoked
*
* @return null for invoking the action, otherwise the forward string
*/
public String onAction(HttpServletRequest request, HttpServletResponse response, ActionServlet action);
/**
* Called AFTER some action is invoked. It may return <code>null</code> 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.
*
* @param request http request
* @param response http response
* @param action action class that is going to be invoked
* @param actionResult
* result of invoked method
*
* @return not-null for overrinding returned action result
*/
public String onAfterAction(HttpServletRequest request, HttpServletResponse response, ActionServlet action, String actionResult);
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?