public class ErrorAttributes extends Object
ServletRequest
when the servlet
container is handling an error or a forward to an error page mapped by error-page
element
in web.xml
.
See documentation for the following request attributes for the values stored in this object:
RequestDispatcher.ERROR_STATUS_CODE
RequestDispatcher.ERROR_MESSAGE
RequestDispatcher.ERROR_REQUEST_URI
RequestDispatcher.ERROR_SERVLET_NAME
RequestDispatcher.ERROR_EXCEPTION_TYPE
RequestDispatcher.ERROR_EXCEPTION
Modifier and Type | Method and Description |
---|---|
Throwable |
getException()
Gets exception.
|
Class<? extends Throwable> |
getExceptionType()
Gets exceptionType.
|
String |
getMessage()
Gets message.
|
String |
getRequestUri()
Gets requestUri.
|
String |
getServletName()
Gets servletName.
|
Integer |
getStatusCode()
Gets statusCode.
|
static ErrorAttributes |
of(javax.servlet.http.HttpServletRequest request,
String filterPrefix)
Factory for creating instances of this class.
|
String |
toString() |
public Integer getStatusCode()
public String getMessage()
public String getRequestUri()
public String getServletName()
public Class<? extends Throwable> getExceptionType()
public Throwable getException()
public static ErrorAttributes of(javax.servlet.http.HttpServletRequest request, String filterPrefix)
request
- null
if it does not.Copyright © 2006–2022 Apache Software Foundation. All rights reserved.