BaseDispatchAction.java
上传用户:nbxinmin
上传日期:2021-10-09
资源大小:46k
文件大小:1k
源码类别:

Internet/IE编程

开发平台:

Java

  1. package com.xdf.exams.web.action;
  2. import javax.servlet.http.HttpServletRequest;
  3. import javax.servlet.http.HttpServletResponse;
  4. import org.apache.struts.action.ActionForm;
  5. import org.apache.struts.action.ActionForward;
  6. import org.apache.struts.action.ActionMapping;
  7. import org.apache.struts.actions.DispatchAction;
  8. public abstract class BaseDispatchAction extends DispatchAction{
  9. public ActionForward execute(ActionMapping mapping, ActionForm form,
  10. HttpServletRequest request, HttpServletResponse response)throws Exception {
  11. String path = mapping.getPath();
  12. String method = path.substring(path.lastIndexOf("/")+1);
  13. return this.dispatchMethod(mapping,form,request,response,method);
  14. }
  15. }