Class CauseTag
java.lang.Object
jakarta.servlet.jsp.tagext.SimpleTagSupport
net.thauvin.erik.httpstatus.taglibs.XmlSupport
net.thauvin.erik.httpstatus.taglibs.CauseTag
Outputs the cause (if any) of the current HTTP status error. The cause is
derived from the underlying
Throwable associated with the error
being processed by the JSP container.
If no cause is available, the tag prints the configured default value. XML escaping is applied when enabled.
- Since:
- 1.0
- Author:
- Erik C. Thauvin
-
Field Summary
Fields inherited from class net.thauvin.erik.httpstatus.taglibs.XmlSupport
defaultValue, escapeXml -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class net.thauvin.erik.httpstatus.taglibs.XmlSupport
setDefault, setEscapeXmlMethods inherited from class jakarta.servlet.jsp.tagext.SimpleTagSupport
findAncestorWithClass, getJspBody, getJspContext, getParent, setJspBody, setJspContext, setParent
-
Constructor Details
-
CauseTag
public CauseTag()
-
-
Method Details
-
doTag
Writes the localized message of the cause associated with the current HTTP status error. If no error, throwable, or cause is available, the default value is used instead.- Specified by:
doTagin interfaceSimpleTag- Overrides:
doTagin classSimpleTagSupport- Throws:
IOException- If an error occurs while writing output
-
getCause
Returns the localized message of the given cause, ornullif no cause or message is available.
-