File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "Spring validation" Watch "Spring validation" New topic

Spring validation

Jose Tlaseca

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:



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
I think you are right the problem is in your jsp please refer any example from and change accordingly and test.
I agree. Here's the link:
subject: Spring validation
It's not a secret anymore!