Code example for Errors

Methods: hasErrors

0
 
 
	@Override 
	protected final int doStartTagInternal() throws ServletException, JspException { 
		this.errors = getRequestContext().getErrors(this.name, isHtmlEscape()); 
		if (this.errors != null && this.errors.hasErrors()) { 
			this.pageContext.setAttribute(ERRORS_VARIABLE_NAME, this.errors, PageContext.REQUEST_SCOPE); 
			return EVAL_BODY_INCLUDE; 
		} 
		else { 
			return SKIP_BODY; 
		} 
	} 
 
	@Override 
	public int doEndTag() { 
		this.pageContext.removeAttribute(ERRORS_VARIABLE_NAME, PageContext.REQUEST_SCOPE); 
		return EVAL_PAGE; 
	} 
 
	/** 
	 * Retrieve the Errors instance that this tag is currently bound to. 
	 * <p>Intended for cooperating nesting tags. 
	 */ 
	public final Errors getErrors() { 
		return this.errors; 
	} 
 
 
	@Override 
	public void doFinally() { 
		super.doFinally(); 
		this.errors = null; 
	} 
 
} 
Connect your IDE to all the code out there  Get Codota for Java