• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Rob Spoor
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Carey Brown
Bartenders:

Spring validation

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?
 
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic