Class DefaultErrorHandlerServlet
- java.lang.Object
-
- javax.servlet.GenericServlet
-
- org.apache.sling.servlets.resolver.internal.defaults.DefaultErrorHandlerServlet
-
- All Implemented Interfaces:
Serializable
,javax.servlet.Servlet
,javax.servlet.ServletConfig
public class DefaultErrorHandlerServlet extends javax.servlet.GenericServlet
TheDefaultErrorHandlerServlet
This is the default error handler servlet registered at the end of the global search path- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description DefaultErrorHandlerServlet()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
renderHtml(javax.servlet.ServletRequest req, javax.servlet.ServletResponse res, String statusMessage, String requestUri, String servletName, int statusCode)
Render the error as htmlprotected void
renderJson(javax.servlet.ServletRequest req, javax.servlet.ServletResponse res, String statusMessage, String requestUri, String servletName, int statusCode)
Render the error as jsonvoid
service(javax.servlet.ServletRequest req, javax.servlet.ServletResponse res)
static String
statusToString(int statusCode)
-
-
-
Method Detail
-
service
public void service(javax.servlet.ServletRequest req, javax.servlet.ServletResponse res) throws IOException
- Specified by:
service
in interfacejavax.servlet.Servlet
- Specified by:
service
in classjavax.servlet.GenericServlet
- Throws:
IOException
-
renderHtml
protected void renderHtml(javax.servlet.ServletRequest req, javax.servlet.ServletResponse res, String statusMessage, String requestUri, String servletName, int statusCode) throws IOException
Render the error as html- Throws:
IOException
-
renderJson
protected void renderJson(javax.servlet.ServletRequest req, javax.servlet.ServletResponse res, String statusMessage, String requestUri, String servletName, int statusCode) throws IOException
Render the error as json- Throws:
IOException
-
statusToString
public static String statusToString(int statusCode)
-
-