?? mydelegatingactionproxy.java
字號:
package com.parddu.crm.web.action;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.log4j.Logger;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import org.springframework.web.struts.DelegatingActionProxy;
import com.parddu.crm.util.MyException;
import com.parddu.crm.util.MyFinal;
public class MyDelegatingActionProxy extends DelegatingActionProxy {
public ActionForward execute(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response) {
ActionForward af = null;
try{
af = super.execute(mapping, form, request, response);
}
catch(Exception e){
e.printStackTrace();
if(e instanceof MyException){
request.setAttribute(MyFinal.REQUEST_ERROR_MESSAGE, e.getMessage());
}
else{
Logger log = Logger.getLogger(MyDelegatingActionProxy.class);
log.error(e.getMessage());
request.setAttribute(MyFinal.REQUEST_ERROR_MESSAGE, "系統忙,請稍后訪問。。。。");
}
af = mapping.findForward("error");
}
return af;
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -