Class CauseTag

All Implemented Interfaces:
JspTag, SimpleTag

public class CauseTag extends XmlSupport
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
  • Constructor Details

    • CauseTag

      public CauseTag()
  • Method Details

    • doTag

      public void doTag() throws IOException
      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:
      doTag in interface SimpleTag
      Overrides:
      doTag in class SimpleTagSupport
      Throws:
      IOException - If an error occurs while writing output
    • getCause

      public String getCause(Throwable cause)
      Returns the localized message of the given cause, or null if no cause or message is available.