|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javax.servlet.GenericServlet | +--javax.servlet.http.HttpServlet
The mother-of-all-HttpServlets. Every normal http servlet extends this class and overrides either the doGet or doPost methods (or both). The server calls service. Service in its turn calls doGet, doPost, whatever, depending on the client's request.
Constructor Summary | |
HttpServlet()
Does nothing |
Method Summary | |
protected void |
doDelete(HttpServletRequest request,
HttpServletResponse response)
This method is called on a "DELETE" request. |
protected void |
doGet(HttpServletRequest request,
HttpServletResponse response)
This method is called on a "GET" request. |
protected void |
doOptions(HttpServletRequest request,
HttpServletResponse response)
This method is called on a "OPTIONS" request. |
protected void |
doPost(HttpServletRequest request,
HttpServletResponse response)
This method is called on a "POST" request. |
protected void |
doPut(HttpServletRequest request,
HttpServletResponse response)
This method is called on a "PUT" request. |
protected void |
doTrace(HttpServletRequest request,
HttpServletResponse response)
This method is called on a "TRACE" request. |
protected long |
getLastModified(HttpServletRequest request)
Returns the time the requested uri was last modified in seconds since 1 january 1970. |
protected void |
service(HttpServletRequest request,
HttpServletResponse response)
This method looks whether the request is a POST, GET, etc method, and then calls the appropriate doPost, doGet, whatever method. If the request method is something it can't handle it sends a HttpServletResponse.SC_BAD_REQUEST error through the response. |
void |
service(ServletRequest request,
ServletResponse response)
Frontend for calling service(HttpServletRequest,HttpServletResponse). |
Methods inherited from class javax.servlet.GenericServlet |
destroy,
getInitParameter,
getInitParameterNames,
getServletConfig,
getServletContext,
getServletInfo,
init,
init,
log,
log |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public HttpServlet()
Method Detail |
protected void doDelete(HttpServletRequest request, HttpServletResponse response) throws ServletException, java.io.IOException
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, java.io.IOException
protected void doOptions(HttpServletRequest request, HttpServletResponse response) throws ServletException, java.io.IOException
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, java.io.IOException
protected void doPut(HttpServletRequest request, HttpServletResponse response) throws ServletException, java.io.IOException
protected void doTrace(HttpServletRequest request, HttpServletResponse response) throws ServletException, java.io.IOException
protected long getLastModified(HttpServletRequest request)
protected void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, java.io.IOException
public void service(ServletRequest request, ServletResponse response) throws ServletException, java.io.IOException
This method tries to typecast the ServletRequest and the
ServletResponse to HttpServletRequest and HttpServletResponse
and then call service(HttpServletRequest,HttpServletResponse).
request
- The client's requestresponse
- The class to write the response date to.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |