FileDocCategorySizeDatePackage
JspException.javaAPI DocGlassfish v2 API4588Fri May 04 22:34:16 BST 2007javax.servlet.jsp

JspException

public class JspException extends Exception
A generic exception known to the JSP engine; uncaught JspExceptions will result in an invocation of the errorpage machinery.

Fields Summary
private Throwable
rootCause
Constructors Summary
public JspException()
Construct a 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.

param
msg a String specifying the text of the exception message

	super(msg);
    
public JspException(String message, Throwable rootCause)
Constructs a new JSP exception when the JSP needs to throw an exception and include a message about the "root cause" exception that interfered with its normal operation, including a description message.

param
message a String containing the text of the exception message
param
rootCause the Throwable exception that interfered with the servlet's normal operation, making this servlet exception necessary

	super(message);
	this.rootCause = rootCause;
    
public JspException(Throwable rootCause)
Constructs a new JSP exception when the JSP 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 JspException, this method can be overridden to create an exception message designed for a specific locale.

param
rootCause the Throwable exception that interfered with the JSP's normal operation, making the JSP exception necessary

	super(rootCause.getLocalizedMessage());
	this.rootCause = rootCause;
    
Methods Summary
public java.lang.ThrowablegetRootCause()
Returns the exception that caused this JSP exception.

return
the Throwable that caused this JSP exception

	return rootCause;