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
The
DefaultErrorHandlerServlet
This is the default error handler servlet registered at the end of the
global search path- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected 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) Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, log, log
-
Constructor Details
-
DefaultErrorHandlerServlet
public DefaultErrorHandlerServlet()
-
-
Method Details
-
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
-