For some reason my form:errors tag isn't outputting anything, even if the Errors object is populated.
I'm quite confused since other Controllers and views are able to output my errors just fine, and I can't for the life of me see what the difference is in this case.
Here's what I have in the problematic Controller class:
And here's what's in the JSP:Code:@RequestMapping(value=URI_EDIT, method=RequestMethod.POST) public ModelAndView edit(ModelMap model, @ModelAttribute UpdateSessionCommand command, Errors errors) { // Validate the Session new UpdateSessionCommandValidator().validate(command, errors); // If there were errors or missing fields, return to the creation view if( errors.hasErrors() ) { logger.debug(errors.getAllErrors().toString()); prepareEditViewModel(model, command); return new ModelAndView(VIEW_EDIT, model); } [...] }
Does anyone have any ideas? This is driving me batty.Code:<c:url var="url" value="${formAction}"/> <form:form action="${url}" commandName="sessionCommand"> <form:errors path="*" cssClass="error" /> [...]


Reply With Quote
