Search code examples
jspspring-mvcjsp-tags

Spring MVC <form:errors/> tag doesn't find error messages


I work with a front-end developer who writes JSP files. We have a form that is working correctly, except validation/binding/processing errors can't seem to be displayed with Spring's <form:errors/> tag.

I've confirmed that the error is being set, and what is apparently the correct path for the errors. Supposedly <form:errors path="*" /> should render them all, regardless of path, but it shows nothing.

Do I need to get into the tag library source to deduce what's going wrong?


Solution

  • Simple answer: <form:errors/> must be within a <form:form/> element in order to bind to the model's "command" object.