• 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 all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
  • Piet Souris
  • Frits Walraven
  • Carey Brown

What is the single Java Validation Mechanism for all kinds of sources ?

Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Requirement :-

I've two scenarios:-

1.) Date Validation of an XML File after XSD validation has been done.
2.) Validating a form with a no. data validations.

What I want :-

I don't want to repeat the code for both cases. I want a single way to implement validation of file and JSP forms using the same code and mechanism.

Please help.

NOTE :- For Business Validation, I will be using DB Procedures.

PS :- I am using Spring Framework with Spring Data JPa
Posts: 322
Eclipse IDE Firefox Browser
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm not sure if anyone else has a better solution, but have you checked out the JavaBean Validation API?

The Bean Validation annotation (and any custom constraints you choose to define) can be used with JSF, unmarshalled XML, and within POJO classes. The Spring framework also supports Bean Validation.
Consider Paul's rocket mass heater.
    Bookmark Topic Watch Topic
  • New Topic