IntelliJ Java IDE
The moose likes Spring and the fly likes Spring validator with Freemarker Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Application Frameworks » Spring
Reply Bookmark "Spring validator with Freemarker" Watch "Spring validator with Freemarker" New topic
Author

Spring validator with Freemarker

farhath farook
Ranch Hand

Joined: Aug 01, 2007
Posts: 33
hi
i developed a sample application using spring and FreeMarker.

here i have a server side validation to be done. so i used the validator class in spring. ( just to check hte availability of the user name from the database)
when i used that the validation happened( where when i entered a existing user name it return to the form) but i could get the error message displayed there

there are the different variation i tried..
1. <#list spring.status.errorMessages as error> ${error}
</#list> - Here the list was empty.

2. <input type="text" name="username" id="username" value="${(user.username)!""}" class="required" />
<@form.errors path="username" cssClass="error"/>
- this did show any output in case of the error though the error have been added as this ---
errors.rejectValue("username", "error.usernameexist", "The username already exsist");---- in the validator class


can any one help me how to output the error message on a FreeMarker

thanks in advance
 
 
subject: Spring validator with Freemarker
 
Threads others viewed
How to Configure SSL over Database in Spring?
Implementing HttpSession in the Spring MVC
Struts2 Issue with localization: Messages not picked up from properties file for forward actions.
Jsp is not displaying in Struts2
Struts 2 client side validation not working with xml configuration
developer file tools

cast iron skillet 49er

more from paul wheaton's glorious empire of web junk: cast iron skillet diatomaceous earth rocket mass heater sepp holzer raised garden beds raising chickens lawn care CFL flea control missoula heat permaculture