eventhandlebase.java
来自「小型论文管理系统 功能还不是很完善 有待改进」· Java 代码 · 共 42 行
JAVA
42 行
package stumanage.events;
import java.io.IOException;
import javax.servlet.*;
import javax.servlet.http.*;
import stumanage.beans.*;
public abstract class EventHandleBase {
public UserInfo user = new UserInfo();
public EventHandleBase() {
}
protected abstract String getURL();
public void process (ServletContext sc,
HttpServletRequest request, HttpServletResponse response)
throws IOException, ServletException {
//Debug.log (this, "process", "Using default process");
}
public void forward (HttpServletRequest request, HttpServletResponse response)
throws IOException, ServletException {
//Debug.log (this, "forward", "Using default forward");
_dispatch (request, response);
}
protected void _dispatch (HttpServletRequest request, HttpServletResponse response)
throws IOException, ServletException {
//Debug.log (this, "_dispatch", "redirecting to " + getURL());
RequestDispatcher rd = request.getRequestDispatcher(getURL());
if (rd == null) {
//Debug.log (this, "_dispatch", "rd = null!");
}
rd.forward (request, response);
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?