📄 beforeresultinterceptor.java
字号:
package com.bluesky.web.struts2.interceptor;import com.opensymphony.xwork2.Action;import com.opensymphony.xwork2.ActionInvocation;import com.opensymphony.xwork2.interceptor.AbstractInterceptor;import com.opensymphony.xwork2.interceptor.PreResultListener;/* * this is a AFTER intercepter, just like the Preparable interceptor. */public class BeforeResultInterceptor extends AbstractInterceptor { /** * */ private static final long serialVersionUID = 1L; public String intercept(ActionInvocation invocation) throws Exception { Action action = (Action)invocation.getAction(); if (action instanceof PreResultListener) { PreResultListener listener = (PreResultListener) action; invocation.addPreResultListener(listener); } String resultCode = invocation.invoke(); return resultCode; }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -