Class WebServiceServlet
java.lang.Object
javax.servlet.GenericServlet
javax.servlet.http.HttpServlet
org.deltava.servlet.GenericServlet
org.deltava.servlet.BasicAuthServlet
org.deltava.servlet.WebServiceServlet
- All Implemented Interfaces:
Serializable
,Servlet
,ServletConfig
A servlet to handle Web Service data requests.
- Since:
- 1.0
- Version:
- 11.5
- Author:
- Luke
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.deltava.servlet.GenericServlet
GenericServlet.ForbiddenException, GenericServlet.NotFoundException, GenericServlet.ServletSecurityContext
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
destroy()
Shuts down the servlet.void
doGet
(HttpServletRequest req, HttpServletResponse rsp) Processes HTTP GET requests for web services.void
doPost
(HttpServletRequest req, HttpServletResponse rsp) Processes HTTP POST requests for web services.Returns the servlet description.void
init()
Initializes the servlet.Methods inherited from class org.deltava.servlet.BasicAuthServlet
authenticate, challenge
Methods inherited from class org.deltava.servlet.GenericServlet
getURL
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service
Methods inherited from class javax.servlet.GenericServlet
getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletName, init, log, log
-
Constructor Details
-
WebServiceServlet
public WebServiceServlet()
-
-
Method Details
-
getServletInfo
Returns the servlet description.- Specified by:
getServletInfo
in interfaceServlet
- Overrides:
getServletInfo
in classGenericServlet
- Returns:
- name, author and copyright info for this servlet
-
init
Initializes the servlet. This loads the service map.- Overrides:
init
in classGenericServlet
- Throws:
ServletException
- if an error occurs- See Also:
-
destroy
public void destroy()Shuts down the servlet. This just logs a message to the servlet log.- Specified by:
destroy
in interfaceServlet
- Overrides:
destroy
in classGenericServlet
-
doGet
public void doGet(HttpServletRequest req, HttpServletResponse rsp) throws ServletException, IOException Processes HTTP GET requests for web services.- Overrides:
doGet
in classHttpServlet
- Parameters:
req
- the HTTP requestrsp
- the HTTP response- Throws:
IOException
- if a network I/O error occursServletException
-
doPost
public void doPost(HttpServletRequest req, HttpServletResponse rsp) throws ServletException, IOException Processes HTTP POST requests for web services. This redirects to the GET handler.- Overrides:
doPost
in classHttpServlet
- Parameters:
req
- the HTTP requestrsp
- the HTTP response- Throws:
IOException
- if a network I/O error occursServletException
- See Also:
-