PDA

View Full Version : error code messages


ikotlyarsky
Jun 1st, 2006, 05:38 PM
1 . I have the following code in validator implementation :

public void validate(Object obj, Errors e)
{
// object level not a field
e.reject("error.invalidDateRange");
}

2. in my context for ResourceBundleMessageSource properties file :

error.invalidDateRange = Inavalid Date Range

3. JSP is choice for view technology

What tag should I use to view my message associated with the code above

<spring:hasBindErrors name="command">
<c:out value="${what goes in here to see Inavalid Date Range ? "/> </spring:hasBindErrors>

Thank you in advance for your help

gmazza
Jun 2nd, 2006, 03:02 PM
Go to this page[1], search on "Writing the JSP" and look at the example right under that text.

Glen

[1] http://www.salixalba.uklinux.net/willow/computing/spring.html

ikotlyarsky
Jun 2nd, 2006, 04:28 PM
Yes , that is what I was looking for.
Thank you Glen !