Class BindErrorsTag
java.lang.Object
jakarta.servlet.jsp.tagext.TagSupport
org.springframework.web.servlet.tags.RequestContextAwareTag
org.springframework.web.servlet.tags.HtmlEscapingAwareTag
org.springframework.web.servlet.tags.BindErrorsTag
- All Implemented Interfaces:
jakarta.servlet.jsp.tagext.IterationTag, jakarta.servlet.jsp.tagext.JspTag, jakarta.servlet.jsp.tagext.Tag, jakarta.servlet.jsp.tagext.TryCatchFinally, Serializable
This
<hasBindErrors> tag provides an Errors instance in case of
bind errors. The HTML escaping flag participates in a page-wide or
application-wide setting (i.e. by HtmlEscapeTag or a "defaultHtmlEscape"
context-param in web.xml).
| Attribute | Required? | Runtime Expression? | Description |
|---|---|---|---|
| htmlEscape | false | true | Set HTML escaping for this tag, as boolean value. Overrides the default HTML escaping setting for the current page. |
| name | true | true | The name of the bean in the request that needs to be inspected for errors. If errors are available for this bean, they will be bound under the 'errors' key. |
- Author:
- Rod Johnson, Juergen Hoeller
- See Also:
-
Field Summary
FieldsFields inherited from class RequestContextAwareTag
logger, REQUEST_CONTEXT_PAGE_ATTRIBUTEFields inherited from class jakarta.servlet.jsp.tagext.TagSupport
id, pageContextFields inherited from interface jakarta.servlet.jsp.tagext.IterationTag
EVAL_BODY_AGAINFields inherited from interface jakarta.servlet.jsp.tagext.Tag
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintdoEndTag()voidprotected final intCalled by doStartTag to perform the actual work.Retrieve the Errors instance that this tag is currently bound to.getName()Return the name of the bean that this tag checks.voidSet the name of the bean that this tag should check.Methods inherited from class HtmlEscapingAwareTag
htmlEscape, isDefaultHtmlEscape, isHtmlEscape, isResponseEncodedHtmlEscape, setHtmlEscapeMethods inherited from class RequestContextAwareTag
doCatch, doStartTag, getRequestContextMethods inherited from class jakarta.servlet.jsp.tagext.TagSupport
doAfterBody, findAncestorWithClass, getId, getParent, getValue, getValues, release, removeValue, setId, setPageContext, setParent, setValue
-
Field Details
-
ERRORS_VARIABLE_NAME
-
-
Constructor Details
-
BindErrorsTag
public BindErrorsTag()
-
-
Method Details
-
setName
Set the name of the bean that this tag should check. -
getName
Return the name of the bean that this tag checks. -
doStartTagInternal
protected final int doStartTagInternal() throws jakarta.servlet.ServletException, jakarta.servlet.jsp.JspExceptionDescription copied from class:RequestContextAwareTagCalled by doStartTag to perform the actual work.- Specified by:
doStartTagInternalin classRequestContextAwareTag- Returns:
- same as TagSupport.doStartTag
- Throws:
jakarta.servlet.ServletExceptionjakarta.servlet.jsp.JspException- See Also:
-
doEndTag
public int doEndTag()- Specified by:
doEndTagin interfacejakarta.servlet.jsp.tagext.Tag- Overrides:
doEndTagin classjakarta.servlet.jsp.tagext.TagSupport
-
getErrors
-
doFinally
public void doFinally()- Specified by:
doFinallyin interfacejakarta.servlet.jsp.tagext.TryCatchFinally- Overrides:
doFinallyin classRequestContextAwareTag
-