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_FOUND
to 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_FOUND
to any request.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
doGet(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp)
String
getServletName()
Gets the name of the servlet.void
servletDeployed(javax.servlet.ServletContext context, String urlPattern)
Notifies the servlet that it has been deployed with the designated context and the designated pattern.void
servletUndeployed(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:
doGet
in classjavax.servlet.http.HttpServlet
- Throws:
javax.servlet.ServletException
IOException
-
getServletName
public String getServletName()
Description copied from interface:DynamicServlet
Gets 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:
getServletName
in interfaceDynamicServlet
- Specified by:
getServletName
in interfacejavax.servlet.ServletConfig
- Overrides:
getServletName
in classjavax.servlet.GenericServlet
- Returns:
- The name of the servlet.
-
servletDeployed
public void servletDeployed(javax.servlet.ServletContext context, String urlPattern)
Description copied from interface:DynamicServlet
Notifies 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:
servletDeployed
in 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:DynamicServlet
Notifies the servlet that it has been undeployed.- Specified by:
servletUndeployed
in interfaceDynamicServlet
- Parameters:
context
- The servlet context of this servlet.
-
-