Package org.apache.sling.cms.core.internal.servlets

## Class CmsDefaultErrorHandlerServlet

- java.lang.Object
- - javax.servlet.GenericServlet
  - - org.apache.sling.api.servlets.SlingSafeMethodsServlet
    - - org.apache.sling.cms.core.internal.servlets.CmsDefaultErrorHandlerServlet

All Implemented Interfaces:
  `Serializable`, `javax.servlet.Servlet`, `javax.servlet.ServletConfig`

    public class CmsDefaultErrorHandlerServlet
    extends org.apache.sling.api.servlets.SlingSafeMethodsServlet

Servlet which includes the content of the page when the page is accessed.

See Also:
  Serialized Form

### Field Summary

Fields
`static String` `DEFAULT_ERROR_PAGE` The page to fall back to if there is not an error page for the specific code
`static String` `SERVICE_USER_NAME` Service User Name for the Error Handler
`static String` `SITE_ERRORS_SUBPATH` The subpath under which to find the error pages
`static String` `SLING_CMS_ERROR_PATH` Path under which the error pages for Sling CMS can be found.

### Constructor Summary

Constructors
`CmsDefaultErrorHandlerServlet​(org.apache.sling.api.resource.ResourceResolverFactory factory)`

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `service​(javax.servlet.ServletRequest req, javax.servlet.ServletResponse res)`

### Methods inherited from class org.apache.sling.api.servlets.SlingSafeMethodsServlet

`doGeneric, doGet, doHead, doOptions, doTrace, getAllowedRequestMethods, getServletInfo, handleMethodNotImplemented, mayService, service`

### Methods inherited from class javax.servlet.GenericServlet

`destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletName, init, init, log, log`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### DEFAULT_ERROR_PAGE

    public static final String DEFAULT_ERROR_PAGE

The page to fall back to if there is not an error page for the specific code

See Also:
  Constant Field Values

#### SERVICE_USER_NAME

    public static final String SERVICE_USER_NAME

Service User Name for the Error Handler

See Also:
  Constant Field Values

#### SITE_ERRORS_SUBPATH

    public static final String SITE_ERRORS_SUBPATH

The subpath under which to find the error pages

See Also:
  Constant Field Values

#### SLING_CMS_ERROR_PATH

    public static final String SLING_CMS_ERROR_PATH

Path under which the error pages for Sling CMS can be found.

See Also:
  Constant Field Values

### Constructor Detail

#### CmsDefaultErrorHandlerServlet

    public CmsDefaultErrorHandlerServlet​(org.apache.sling.api.resource.ResourceResolverFactory factory)

### Method Detail

#### service

    public void service​(javax.servlet.ServletRequest req,
                        javax.servlet.ServletResponse res)
                 throws IOException

Specified by:
  `service` in interface `javax.servlet.Servlet`
Overrides:
  `service` in class `org.apache.sling.api.servlets.SlingSafeMethodsServlet`
Throws:
  `IOException`