Class XmlSupport
java.lang.Object
jakarta.servlet.jsp.tagext.SimpleTagSupport
net.thauvin.erik.httpstatus.taglibs.XmlSupport
- Direct Known Subclasses:
CauseTag,MessageTag,ReasonTag
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 Summary
FieldsModifier and TypeFieldDescriptionprotected StringThe default value to use when the tag produces no output.protected booleanWhether XML escaping is enabled. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidsetDefault(String defaultValue) Sets the default value used when the tag produces no output.voidsetEscapeXml(boolean escapeXml) Enables or disables XML escaping for the tag output.Methods inherited from class jakarta.servlet.jsp.tagext.SimpleTagSupport
doTag, findAncestorWithClass, getJspBody, getJspContext, getParent, setJspBody, setJspContext, setParent
-
Field Details
-
defaultValue
The default value to use when the tag produces no output. -
escapeXml
protected boolean escapeXmlWhether XML escaping is enabled. Defaults totrue.
-
-
Constructor Details
-
XmlSupport
public XmlSupport()
-
-
Method Details
-
setDefault
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.
-