aspose file tools*
The moose likes Spring and the fly likes Spring validation Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "Spring validation" Watch "Spring validation" New topic
Author

Spring validation

Jose Tlaseca
Greenhorn

Joined: Oct 11, 2011
Posts: 1
Hello everybody:

I have a java web application project with Spring framework in netbeans and I'm trying to use Spring validation.

What my application does is raise a support ticket.

I have read several tutorials and I've gotten the form is not sent until the fields are filled. The problem is that I can not get to show error messages which I defined in the class "Validator".

That is, if required fields are not filled the form is not sent, but the error message does not appear anywhere.

Can someone tell me what I'm doing wrong?


These are my codes:




SupportTicket Class:










SupportTicketValidator class:








SupportTicketController Class:








Dispatcher-Servlet.xml:







InputView.jsp:







As I mentioned, the validation works (I think) because the form is not submited until i fill the required fields, but the error messages are not shown with that < form:errors > tags.


Can you give me an advice to solve my problem?
abani patra
Ranch Hand

Joined: Oct 11, 2011
Posts: 70
Hi,
I think you are right the problem is in your jsp please refer any example from http://www.vaannila.com/spring/spring-form-validation-1.html and change accordingly and test.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Spring validation
 
Similar Threads
Problem in saving the form
Spring or EJB
Getting a headage..... Cannot find class [...] for bean with name '...' defined in ServletContext re
org.springframework.beans.NotReadablePropertyException
problem with submit: NullValueInNestedPathException: