|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
javax.servlet.jsp Class ErrorData
java.lang.Object javax.servlet.jsp.ErrorData
public final class ErrorData
- extends Object
包含关于错误的信息,用于错误页面。如果未在错误页面上下文中使用,则此实例中包含的信息是无意义的。要指示某个 JSP 是一个错误页面,页面作者必须将页面指令的 isErrorPage 属性设置为 "true"。
since | 2.0 |
See also | getErrorData |
Contains information about an error, for error pages. The information contained in this instance is meaningless if not used in the context of an error page. To indicate a JSP is an error page, the page author must set the isErrorPage attribute of the page directive to "true".
- Since:
- JSP 2.0
- See Also:
PageContext.getErrorData()
Constructor Summary | |
---|---|
ErrorData(Throwable throwable,
int statusCode,
String uri,
String servletName)
Creates a new ErrorData object. |
Method Summary | |
---|---|
String |
getRequestURI()
Returns the request URI. |
String |
getServletName()
Returns the name of the servlet invoked. |
int |
getStatusCode()
Returns the status code of the error. |
Throwable |
getThrowable()
Returns the Throwable that caused the error. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public
ErrorData(Throwable throwable, int statusCode, String uri, String servletName)
创建新的 ErrorData 对象。
throwable | 导致错误的 Throwable |
statusCode | 错误的状态代码 |
uri | 请求 URI |
servletName | 调用的 servlet 的名称 |
ErrorData
public ErrorData(Throwable throwable, int statusCode, String uri, String servletName)
- Creates a new ErrorData object.
- Parameters:
throwable
- The Throwable that is the cause of the errorstatusCode
- The status code of the erroruri
- The request URIservletName
- The name of the servlet invoked
Method Detail |
---|
public Throwable
getThrowable()
返回导致错误的 Throwable。
return | 导致错误的 Throwable |
getThrowable
public Throwable getThrowable()
- Returns the Throwable that caused the error.
- Returns:
- The Throwable that caused the error
public int
getStatusCode()
返回错误的状态代码。
return | 错误的状态代码 |
getStatusCode
public int getStatusCode()
- Returns the status code of the error.
- Returns:
- The status code of the error
public String
getRequestURI()
返回请求 URI。
return | 请求 URI |
getRequestURI
public String getRequestURI()
- Returns the request URI.
- Returns:
- The request URI
public String
getServletName()
返回调用的 servlet 的名称。
return | 调用的 servlet 的名称 |
getServletName
public String getServletName()
- Returns the name of the servlet invoked.
- Returns:
- The name of the servlet invoked
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Submit a bug or feature
Copyright 2007 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.
PS : 未经我党受权你也可自由散发此文档。 如有任何错误请自行修正;若因此而造成任何损失请直接找人民主席,请勿与本人联系。谢谢!