📄 actionfilter.java
字号:
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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -