Class Default404Servlet
- java.lang.Object
-
- javax.servlet.GenericServlet
-
- javax.servlet.http.HttpServlet
-
- de.aristaflow.adept2.base.servletcontainer.Default404Servlet
-
- All Implemented Interfaces:
DynamicServlet,Serializable,javax.servlet.Servlet,javax.servlet.ServletConfig
public class Default404Servlet extends javax.servlet.http.HttpServlet implements DynamicServlet
This servlet simply returnsHttpServletResponse.SC_NOT_FOUNDto any request. It is similar to/copied fromServletHandler.Default404Servlet.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Default404Servlet()Creates a new servlet simply returningHttpServletResponse.SC_NOT_FOUNDto any request.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voiddoGet(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp)StringgetServletName()Gets the name of the servlet.voidservletDeployed(javax.servlet.ServletContext context, String urlPattern)Notifies the servlet that it has been deployed with the designated context and the designated pattern.voidservletUndeployed(javax.servlet.ServletContext context)Notifies the servlet that it has been undeployed.-
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service, service
-
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, init, init, log, log
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface de.aristaflow.adept2.base.servletcontainer.DynamicServlet
servletDeployed
-
-
-
-
Method Detail
-
doGet
protected void doGet(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp) throws javax.servlet.ServletException, IOException- Overrides:
doGetin classjavax.servlet.http.HttpServlet- Throws:
javax.servlet.ServletExceptionIOException
-
getServletName
public String 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 interfacejavax.servlet.ServletConfig- Overrides:
getServletNamein classjavax.servlet.GenericServlet- Returns:
- The name of the servlet.
-
servletDeployed
public void servletDeployed(javax.servlet.ServletContext context, String urlPattern)Description copied from interface:DynamicServletNotifies the servlet that it has been deployed with the designated context and the designated pattern. Note that the servlet usually will not have been initialised yet.- Specified by:
servletDeployedin interfaceDynamicServlet- Parameters:
context- The servlet context of this servlet.urlPattern- The URL pattern (mapping) this servlet has been deployed with.
-
servletUndeployed
public void servletUndeployed(javax.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.
-
-