Class Default404Servlet
java.lang.Object
jakarta.servlet.GenericServlet
jakarta.servlet.http.HttpServlet
de.aristaflow.adept2.base.servletcontainer.Default404Servlet
- All Implemented Interfaces:
DynamicServlet,jakarta.servlet.Servlet,jakarta.servlet.ServletConfig,Serializable
This servlet simply returns
HttpServletResponse.SC_NOT_FOUND to any request. It is
similar to/copied from ServletHandler.Default404Servlet.- See Also:
-
Field Summary
Fields inherited from class jakarta.servlet.http.HttpServlet
LEGACY_DO_HEAD -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new servlet simply returningHttpServletResponse.SC_NOT_FOUNDto any request. -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddoGet(jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse resp) Gets the name of the servlet.voidservletDeployed(jakarta.servlet.ServletContext context, Collection<String> urlPatterns) Notifies the servlet that it has been deployed with the designated context and the designated patterns.voidservletUndeployed(jakarta.servlet.ServletContext context) Notifies the servlet that it has been undeployed.Methods inherited from class jakarta.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPatch, doPost, doPut, doTrace, getLastModified, init, isSensitiveHeader, service, serviceMethods inherited from class jakarta.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, init, log, logMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface jakarta.servlet.Servlet
destroy, getServletConfig, getServletInfo, init, service
-
Constructor Details
-
Default404Servlet
public Default404Servlet()Creates a new servlet simply returningHttpServletResponse.SC_NOT_FOUNDto any request.
-
-
Method Details
-
doGet
protected void doGet(jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse resp) throws jakarta.servlet.ServletException, IOException - Overrides:
doGetin classjakarta.servlet.http.HttpServlet- Throws:
jakarta.servlet.ServletExceptionIOException
-
getServletName
Description copied from interface:DynamicServletGets the name of the servlet. Note that usually the servlet implementations rely on the servlet configuration to provide a name. However, when using aDynamicServlet, the servlet name has to be provided explicitly.- Specified by:
getServletNamein interfaceDynamicServlet- Specified by:
getServletNamein interfacejakarta.servlet.ServletConfig- Overrides:
getServletNamein classjakarta.servlet.GenericServlet- Returns:
- The name of the servlet.
-
servletDeployed
Description copied from interface:DynamicServletNotifies the servlet that it has been deployed with the designated context and the designated patterns. Note that the servlet usually will not have been initialised yet.- Specified by:
servletDeployedin interfaceDynamicServlet- Parameters:
context- The servlet context of this servlet.urlPatterns- The URL patterns (mapping) this servlet has been deployed with.
-
servletUndeployed
public void servletUndeployed(jakarta.servlet.ServletContext context) Description copied from interface:DynamicServletNotifies the servlet that it has been undeployed.- Specified by:
servletUndeployedin interfaceDynamicServlet- Parameters:
context- The servlet context of this servlet.
-