|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
javax.servlet.jsp Class JspException
java.lang.Object java.lang.Throwable java.lang.Exception javax.servlet.jsp.JspException
- All Implemented Interfaces:
- Serializable
- Direct Known Subclasses:
- JspTagException, SkipPageException
public class JspException
- extends Exception
Extends:
Throwable > Exception
Extended by:
JspTagException, SkipPageException
JSP 引擎已知的一般异常;未捕获的 JspException 将导致调用 errorpage 机制。
A generic exception known to the JSP engine; uncaught JspExceptions will result in an invocation of the errorpage machinery.
- See Also:
- Serialized Form
Constructor Summary | |
---|---|
JspException()
Construct a JspException. |
|
JspException(String msg)
Constructs a new JSP exception with the specified message. |
|
JspException(String message,
Throwable cause)
Constructs a new JspException with the specified detail
message and cause. |
|
JspException(Throwable cause)
Constructs a new JspException with the specified cause. |
Method Summary | |
---|---|
Throwable |
getRootCause()
Deprecated. As of JSP 2.1, replaced by Throwable.getCause() |
Methods inherited from class java.lang.Throwable |
---|
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public
JspException()
构造 JspException。
英文文档:
JspException
public JspException()
- Construct a JspException.
public
JspException(String msg)
构造带指定消息的新 JSP 异常。该消息可以写入到服务器日志和/或向用户显示。
msg |
指定异常消息文本的 String |
JspException
public JspException(String msg)
- Constructs a new JSP exception with the
specified message. The message can be written
to the server log and/or displayed for the user.
- Parameters:
msg
- aString
specifying the text of the exception message
public
JspException(String message, Throwable rootCause)
当 JSP 需要抛出异常并且需要包含有关妨碍 JSP 正常操作的“根本原因”异常的消息时,构造一个新 JSP 异常,该异常包含一条描述消息。
message |
包含异常消息文本的 String |
rootCause |
防碍 servlet 正常操作的 Throwable 异常,使此 servlet 异常成为必需的 |
JspException
public JspException(String message, Throwable cause)
- Constructs a new
JspException
with the specified detail message and cause. The cause is saved for later retrieval by theThrowable.getCause()
andgetRootCause()
methods.
public
JspException(Throwable rootCause)
当 JSP 需要抛出异常并且需要包含有关妨碍 JSP 正常操作的“根本原因”异常的消息时,构造一个新 JSP 异常。该异常消息以底层异常的本地化消息为基础。
此方法调用 Throwable
异常的 getLocalizedMessage
方法获取本地化异常消息。在子类化 JspException
时,可重写此方法以创建设计用于特定语言环境的异常消息。
rootCause |
防碍 JSP 正常操作的 Throwable 异常,使此 JSP 异常成为必需的 |
JspException
public JspException(Throwable cause)
- Constructs a new
JspException
with the specified cause. The cause is saved for later retrieval by theThrowable.getCause()
andgetRootCause()
methods.- See Also:
Exception.Exception(Throwable)
Method Detail |
---|
public Throwable
getRootCause()
返回导致此 JSP 异常的异常。
return |
导致此 JSP 异常的 Throwable |
getRootCause
public Throwable getRootCause()
- Deprecated. As of JSP 2.1, replaced by
Throwable.getCause()
- Returns the exception that caused this JSP exception.
- Returns:
- the
Throwable
that caused this JSP exception
|
|||||||||
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 : 未经我党受权你也可自由散发此文档。 如有任何错误请自行修正;若因此而造成任何损失请直接找人民主席,请勿与本人联系。谢谢!