public abstract class BaseServlet
extends javax.servlet.http.HttpServlet
构造器和说明 |
---|
BaseServlet() |
限定符和类型 | 方法和说明 |
---|---|
void |
doGet(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
处理get请求
|
void |
doPost(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
处理post请求
|
long |
getLastModified(javax.servlet.http.HttpServletRequest request) |
static void |
saveRequestContext(javax.servlet.http.HttpServletRequest req)
从请求中获取需要的一些服务器信息, 塞入calculator
|
doDelete, doHead, doOptions, doPut, doTrace, service, service
public void doGet(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res) throws java.io.IOException, javax.servlet.ServletException
doGet
在类中 javax.servlet.http.HttpServlet
req
- HTTP请求res
- HTTP响应java.io.IOException
javax.servlet.ServletException
public void doPost(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res) throws javax.servlet.ServletException, java.io.IOException
doPost
在类中 javax.servlet.http.HttpServlet
req
- HTTP请求res
- HTTP响应javax.servlet.ServletException
java.io.IOException
public static void saveRequestContext(javax.servlet.http.HttpServletRequest req)
req
- HTTP请求public long getLastModified(javax.servlet.http.HttpServletRequest request)
getLastModified
在类中 javax.servlet.http.HttpServlet