Class XmlSupport

java.lang.Object
jakarta.servlet.jsp.tagext.SimpleTagSupport
net.thauvin.erik.httpstatus.taglibs.XmlSupport
All Implemented Interfaces:
JspTag, SimpleTag
Direct Known Subclasses:
CauseTag, MessageTag, ReasonTag

public abstract class XmlSupport extends SimpleTagSupport
Base class providing support for the default and escapeXml attributes shared by several tags in the HttpStatus tag library.

The default attribute supplies a fallback value when the tag produces no output. The escapeXml attribute controls whether the output is XML‑escaped.

Since:
1.0
Author:
Erik C. Thauvin
  • Field Details

    • defaultValue

      protected String defaultValue
      The default value to use when the tag produces no output.
    • escapeXml

      protected boolean escapeXml
      Whether XML escaping is enabled. Defaults to true.
  • Constructor Details

    • XmlSupport

      public XmlSupport()
  • Method Details

    • setDefault

      public void setDefault(String defaultValue)
      Sets the default value used when the tag produces no output.
    • setEscapeXml

      public void setEscapeXml(boolean escapeXml)
      Enables or disables XML escaping for the tag output.