Class CodeTag
java.lang.Object
jakarta.servlet.jsp.tagext.SimpleTagSupport
net.thauvin.erik.httpstatus.taglibs.CodeTag
Outputs the HTTP status code associated with the current error being
processed by the JSP container. If no error information is available,
the tag produces no output.
This tag is typically used on JSP error pages to display the numeric status code that triggered the error handling mechanism.
- Since:
- 1.0
- Author:
- Erik C. Thauvin
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddoTag()Writes the HTTP status code to the current output stream.Methods inherited from class jakarta.servlet.jsp.tagext.SimpleTagSupport
findAncestorWithClass, getJspBody, getJspContext, getParent, setJspBody, setJspContext, setParent
-
Constructor Details
-
CodeTag
public CodeTag()
-
-
Method Details
-
doTag
Writes the HTTP status code to the current output stream. If the page is not processing an error, no output is generated.- Specified by:
doTagin interfaceSimpleTag- Overrides:
doTagin classSimpleTagSupport- Throws:
IOException- If an error occurs while writing output
-