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.6
- 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 TypeMethodDescriptionvoiddestroy()Shuts down the servlet.voiddoGet(HttpServletRequest req, HttpServletResponse rsp) Processes HTTP GET requests for web services.voiddoPost(HttpServletRequest req, HttpServletResponse rsp) Processes HTTP POST requests for web services.Returns the servlet description.voidinit()Initializes the servlet.Methods inherited from class org.deltava.servlet.BasicAuthServlet
authenticate, challengeMethods inherited from class org.deltava.servlet.GenericServlet
getURLMethods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, serviceMethods 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:
getServletInfoin interfaceServlet- Overrides:
getServletInfoin classGenericServlet- Returns:
- name, author and copyright info for this servlet
-
init
Initializes the servlet. This loads the service map.- Overrides:
initin 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:
destroyin interfaceServlet- Overrides:
destroyin classGenericServlet
-
doGet
public void doGet(HttpServletRequest req, HttpServletResponse rsp) throws ServletException, IOException Processes HTTP GET requests for web services.- Overrides:
doGetin 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:
doPostin classHttpServlet- Parameters:
req- the HTTP requestrsp- the HTTP response- Throws:
IOException- if a network I/O error occursServletException- See Also:
-