- java.lang.Object
-
- jakarta.servlet.GenericServlet
-
- jakarta.servlet.http.HttpServlet
-
- me.chrisswr1.test.webapp.BaseServlet
-
- All Implemented Interfaces:
Servlet,ServletConfig,Serializable
- Direct Known Subclasses:
MainServlet
public abstract class BaseServlet extends HttpServlet
HttpServlet, which merges the request methods GET and POST- Since:
- 1.0.0
- Version:
- 3.0.0
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class jakarta.servlet.http.HttpServlet
LEGACY_DO_HEAD
-
-
Constructor Summary
Constructors Constructor Description BaseServlet()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected voiddoGet(@Nullable HttpServletRequest request, @Nullable HttpServletResponse response)protected voiddoPost(@Nullable HttpServletRequest request, @Nullable HttpServletResponse response)protected abstract voiddoRequest(@Nullable HttpServletRequest request, @Nullable HttpServletResponse response)Handles a request.-
Methods inherited from class jakarta.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPatch, doPut, doTrace, getLastModified, init, isSensitiveHeader, service, service
-
Methods inherited from class jakarta.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
-
-
-
-
Method Detail
-
doRequest
protected abstract void doRequest(@Nullable @Nullable HttpServletRequest request, @Nullable @Nullable HttpServletResponse response) throws IOException
Handles a request. Independent to the method (GET or POST).- Parameters:
request- theHttpServletRequestfrom the clientresponse- theHttpServletResponse, which will be sent to the client- Throws:
IOException- if any in- or outputExceptionoccurred- Since:
- 1.0.0
- See Also:
doGet(HttpServletRequest, HttpServletResponse),doPost(HttpServletRequest, HttpServletResponse)
-
doGet
protected void doGet(@Nullable @Nullable HttpServletRequest request, @Nullable @Nullable HttpServletResponse response) throws IOException
- Overrides:
doGetin classHttpServlet- Throws:
IOException
-
doPost
protected void doPost(@Nullable @Nullable HttpServletRequest request, @Nullable @Nullable HttpServletResponse response) throws IOException
- Overrides:
doPostin classHttpServlet- Throws:
IOException
-
-