If you plan to display all error messages at the same time, use the following taglib.
<%@taglib uri="http://www.springframework.org/tags" prefix="spring" %>
Sort of,
<spring:hasBindErrors htmlEscape="true" name="someBean">
<c:if test="${errors.errorCount gt 0}">
<h4>The error list :</h4>
<font color="red">
<c:forEach items="${errors.allErrors}" var="error">
<spring:message code="${error.code}"
arguments="${error.arguments}"
text="${error.defaultMessage}"/><br/>
</c:forEach>
</font>
</c:if>
</spring:hasBindErrors>
Note that the name="someBean"tag name attribute <spring:hasBindErrors/>is your actual command object attached to your form.
source
share