Class BindErrorsTag

java.lang.Object
jakarta.servlet.jsp.tagext.TagSupport
All Implemented Interfaces:
jakarta.servlet.jsp.tagext.IterationTag, jakarta.servlet.jsp.tagext.JspTag, jakarta.servlet.jsp.tagext.Tag, jakarta.servlet.jsp.tagext.TryCatchFinally, Serializable

public class BindErrorsTag extends HtmlEscapingAwareTag
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 Summary
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 Details

  • Constructor Details

    • BindErrorsTag

      public BindErrorsTag()
  • Method Details

    • setName

      public void setName(String name)
      Set the name of the bean that this tag should check.
    • getName

      public String getName()
      Return the name of the bean that this tag checks.
    • doStartTagInternal

      protected final int doStartTagInternal() throws jakarta.servlet.ServletException, jakarta.servlet.jsp.JspException
      Description copied from class: RequestContextAwareTag
      Called by doStartTag to perform the actual work.
      Specified by:
      doStartTagInternal in class RequestContextAwareTag
      Returns:
      same as TagSupport.doStartTag
      Throws:
      jakarta.servlet.ServletException
      jakarta.servlet.jsp.JspException
      See Also:
      • TagSupport.doStartTag()
    • doEndTag

      public int doEndTag()
      Specified by:
      doEndTag in interface jakarta.servlet.jsp.tagext.Tag
      Overrides:
      doEndTag in class jakarta.servlet.jsp.tagext.TagSupport
    • getErrors

      public final @Nullable Errors getErrors()
      Retrieve the Errors instance that this tag is currently bound to.

      Intended for cooperating nesting tags.

    • doFinally

      public void doFinally()
      Specified by:
      doFinally in interface jakarta.servlet.jsp.tagext.TryCatchFinally
      Overrides:
      doFinally in class RequestContextAwareTag