4

I am having the following code in a Spring-MVC command bean:

@AssertTrue
public boolean isConditionTrue() {
    return false;
}

private boolean conditionTrue;

My JSP contains the following:

<form:errors path="conditionTrue" cssClass="error" />

I would expect to see some error message in the produced HTML... however I see no error message. What do I miss?

Thanks!!!

rapt
  • 11,810
  • 35
  • 103
  • 145
  • Does it work for other annotations? – Ralph Aug 23 '11 at 05:39
  • 1
    Thanks. I just found out what was the problem. I was using a too old version of `http://www.springframework.org/schema/mvc` in my dispatcher-servlet.xml. I now use `http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.1.xsd` and `@AssertTrue` works again! – rapt Aug 23 '11 at 10:46
  • 3
    You should post that comment as an answer to your own question and accept that answer to prevent stackoverflow from displaying this question as unanswered. Thanks! – L.Butz Oct 16 '13 at 20:28

0 Answers0