|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
javax.servlet.jsp Class JspTagException
java.lang.Object java.lang.Throwable java.lang.Exception javax.servlet.jsp.JspException javax.servlet.jsp.JspTagException
- All Implemented Interfaces:
- Serializable
public class JspTagException
- extends JspException
标记处理程序使用的异常,指示某个不可恢复的错误。此错误将由顶层 JSP 页面捕获,并且将导致一个错误页面。
Exception to be used by a Tag Handler to indicate some unrecoverable error. This error is to be caught by the top level of the JSP page and will result in an error page.
- See Also:
- Serialized Form
Constructor Summary | |
---|---|
JspTagException()
Constructs a new JspTagException with no message. |
|
JspTagException(String msg)
Constructs a new JspTagException with the specified message. |
|
JspTagException(String message,
Throwable rootCause)
Constructs a new JspTagException when the JSP Tag needs to throw an exception and include a message about the "root cause" exception that interfered with its normal operation, including a description message. |
|
JspTagException(Throwable rootCause)
Constructs a new JSP Tag exception when the JSP Tag needs to throw an exception and include a message about the "root cause" exception that interfered with its normal operation. |
Method Summary |
---|
Methods inherited from class javax.servlet.jsp.JspException |
---|
getRootCause |
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
JspTagException(String msg)
构造带指定消息的新 JspTagException。该消息可以写入到服务器日志和/或向用户显示。
msg |
指定异常消息文本的 String |
JspTagException
public JspTagException(String msg)
- Constructs a new JspTagException 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
JspTagException()
构造不带消息的新 JspTagException。
英文文档:
JspTagException
public JspTagException()
- Constructs a new JspTagException with no message.
public
JspTagException(String message, Throwable rootCause)
当 JSP 标记需要抛出异常并且需要包含有关妨碍 JSP 标记正常操作的“根本原因”异常的消息时,构造一个新 JspTagException,该异常包含一条描述消息。
message |
包含异常消息文本的 String |
rootCause |
防碍 JSP 标记正常操作的 Throwable 异常,使此 JSP 标记异常成为必需的 |
since | 2.0 |
JspTagException
public JspTagException(String message, Throwable rootCause)
- Constructs a new JspTagException when the JSP Tag
needs to throw an exception and include a message
about the "root cause" exception that interfered with its
normal operation, including a description message.
- Parameters:
message
- aString
containing the text of the exception messagerootCause
- theThrowable
exception that interfered with the JSP Tag's normal operation, making this JSP Tag exception necessary- Since:
- JSP 2.0
public
JspTagException(Throwable rootCause)
当 JSP 标记需要抛出异常并且需要包含有关妨碍 JSP 标记正常操作的“根本原因”异常的消息时,构造一个新 JSP 标记异常。该异常消息以底层异常的本地化消息为基础。
此方法调用 Throwable
异常的 getLocalizedMessage
方法获取本地化异常消息。在子类化 JspTagException
时,可重写此方法以创建设计用于特定语言环境的异常消息。
rootCause |
防碍 JSP 标记正常操作的 Throwable 异常,使此 JSP 标记异常成为必需的 |
since | 2.0 |
JspTagException
public JspTagException(Throwable rootCause)
- Constructs a new JSP Tag exception when the JSP Tag
needs to throw an exception and include a message
about the "root cause" exception that interfered with its
normal operation. The exception's message is based on the localized
message of the underlying exception.
This method calls the
getLocalizedMessage
method on theThrowable
exception to get a localized exception message. When subclassingJspTagException
, this method can be overridden to create an exception message designed for a specific locale.- Parameters:
rootCause
- theThrowable
exception that interfered with the JSP Tag's normal operation, making the JSP Tag exception necessary- Since:
- JSP 2.0
|
|||||||||
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 : 未经我党受权你也可自由散发此文档。 如有任何错误请自行修正;若因此而造成任何损失请直接找人民主席,请勿与本人联系。谢谢!