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

    Constructors
    Constructor
    Description
     
  • Method Summary

    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 html
    protected void
    renderJson(javax.servlet.ServletRequest req, javax.servlet.ServletResponse res, String statusMessage, String requestUri, String servletName, int statusCode)
    Render the error as json
    void
    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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 interface javax.servlet.Servlet
      Specified by:
      service in class javax.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)