Class MessageTag
java.lang.Object
jakarta.servlet.jsp.tagext.SimpleTagSupport
net.thauvin.erik.httpstatus.taglibs.XmlSupport
net.thauvin.erik.httpstatus.taglibs.MessageTag
Outputs the error message associated with the current HTTP status error.
If no message is available, the tag prints the configured default value.
XML escaping is applied when enabled.
This tag is typically used on JSP error pages to display the message supplied by the servlet container or application.
- Since:
- 1.0.5
- Author:
- Erik C. Thauvin
-
Field Summary
Fields inherited from class net.thauvin.erik.httpstatus.taglibs.XmlSupport
defaultValue, escapeXml -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddoTag()Writes the error message associated with the current request.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
-
MessageTag
public MessageTag()
-
-
Method Details
-
doTag
Writes the error message associated with the current request. If the request is not processing an error, the default value is used instead.- Specified by:
doTagin interfaceSimpleTag- Overrides:
doTagin classSimpleTagSupport- Throws:
IOException- If an error occurs while writing output
-