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