Could someone guide me on this fundamental question: What are the best way ways of performing server side validations on data using Java?
I would like to know if there are open source libraries available to perform server side validations as well.
Any help is appreciated.
It depends on which web developement framework you are using.
Raw JSP Servlet
If you are using simple jsp servlet, Then I would suggest add one validator package/jar for each form/jsp screen. and validate it from controller before passing to service.
JSF
If you are using JSF then there is very well designed validation phase provided , You can use ready made validators (you can just add annotation on the form field and its done) or you can create your own validators also.
Spring MVC
If you are using Spring MVC , it has also got a saperate layer for validation.
Struts
Struts has also got saperate layer for validation
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With