JspTagException (Java EE 5)

Java EE API


javax.servlet.jsp Class JspTagException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by javax.servlet.jsp.JspException
              extended by javax.servlet.jsp.JspTagException
All Implemented Interfaces:
Serializable

public class JspTagException
extends JspException

Extends: Throwable > Exception > 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
 
Method Summary
 
Methods inherited from class javax.servlet.jsp.JspException
 
Methods inherited from class java.lang.Throwable
 
Methods inherited from class java.lang.Object
 

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 - a String 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 标记异常成为必需的
since2.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 - a String containing the text of the exception message
rootCause - the Throwable 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 标记异常成为必需的
since2.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 the Throwable exception to get a localized exception message. When subclassing JspTagException, this method can be overridden to create an exception message designed for a specific locale.

Parameters:
rootCause - the Throwable exception that interfered with the JSP Tag's normal operation, making the JSP Tag exception necessary
Since:
JSP 2.0



Submit a bug or feature

Copyright 2007 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.

一看就知道只有菜鸟才干这么无知的事啦。

PS : 未经我党受权你也可自由散发此文档。 如有任何错误请自行修正;若因此而造成任何损失请直接找人民主席,请勿与本人联系。谢谢!