|
|||||||||
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. |
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, 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
ServletException
- if an Servlet Exception occursjava.io.IOException
- if an IOException occursprotected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, java.io.IOException
ServletException
- if an Servlet Exception occursjava.io.IOException
- if an IOException occursprotected void doOptions(HttpServletRequest request, HttpServletResponse response) throws ServletException, java.io.IOException
ServletException
- if an Servlet Exception occursjava.io.IOException
- if an IOException occursprotected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, java.io.IOException
ServletException
- if an Servlet Exception occursjava.io.IOException
- if an IOException occursprotected void doPut(HttpServletRequest request, HttpServletResponse response) throws ServletException, java.io.IOException
ServletException
- if an Servlet Exception occursjava.io.IOException
- if an IOException occursprotected void doTrace(HttpServletRequest request, HttpServletResponse response) throws ServletException, java.io.IOException
ServletException
- if an Servlet Exception occursjava.io.IOException
- if an IOException occursprotected long getLastModified(HttpServletRequest request)
protected void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, java.io.IOException
ServletException
- an error has occuredjava.io.IOException
- an error has occuredpublic 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).
service
in class GenericServlet
request
- The client's requestresponse
- The class to write the response date to.ServletException
- an error has occuredjava.io.IOException
- an error has occured
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |