Class WebServiceServlet
java.lang.Object
jakarta.servlet.GenericServlet
jakarta.servlet.http.HttpServlet
org.deltava.servlet.GenericServlet
org.deltava.servlet.BasicAuthServlet
org.deltava.servlet.WebServiceServlet
- All Implemented Interfaces:
jakarta.servlet.Servlet, jakarta.servlet.ServletConfig, Serializable
A servlet to handle Web Service data requests.
- Since:
- 1.0
- Version:
- 12.3
- Author:
- Luke
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class GenericServlet
GenericServlet.ForbiddenException, GenericServlet.NotFoundException, GenericServlet.ServletSecurityContext -
Field Summary
Fields inherited from class jakarta.servlet.http.HttpServlet
LEGACY_DO_HEAD -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddestroy()Shuts down the servlet.voiddoGet(jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse rsp) Processes HTTP GET requests for web services.voiddoPost(jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse rsp) Processes HTTP POST requests for web services.Returns the servlet description.voidinit()Initializes the servlet.Methods inherited from class BasicAuthServlet
authenticate, challengeMethods inherited from class GenericServlet
getURLMethods inherited from class jakarta.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPatch, doPut, doTrace, getLastModified, init, isSensitiveHeader, service, serviceMethods inherited from class jakarta.servlet.GenericServlet
getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletName, log, log
-
Constructor Details
-
WebServiceServlet
public WebServiceServlet()
-
-
Method Details
-
getServletInfo
Returns the servlet description.- Specified by:
getServletInfoin interfacejakarta.servlet.Servlet- Overrides:
getServletInfoin classjakarta.servlet.GenericServlet- Returns:
- name, author and copyright info for this servlet
-
init
public void init() throws jakarta.servlet.ServletExceptionInitializes the servlet. This loads the service map.- Overrides:
initin classjakarta.servlet.GenericServlet- Throws:
jakarta.servlet.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 interfacejakarta.servlet.Servlet- Overrides:
destroyin classjakarta.servlet.GenericServlet
-
doGet
public void doGet(jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse rsp) throws jakarta.servlet.ServletException, IOException Processes HTTP GET requests for web services.- Overrides:
doGetin classjakarta.servlet.http.HttpServlet- Parameters:
req- the HTTP requestrsp- the HTTP response- Throws:
IOException- if a network I/O error occursjakarta.servlet.ServletException
-
doPost
public void doPost(jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse rsp) throws jakarta.servlet.ServletException, IOException Processes HTTP POST requests for web services. This redirects to the GET handler.- Overrides:
doPostin classjakarta.servlet.http.HttpServlet- Parameters:
req- the HTTP requestrsp- the HTTP response- Throws:
IOException- if a network I/O error occursjakarta.servlet.ServletException- See Also:
-