Click to See Complete Forum and Search --> : Struts or javascript validation


vik111
08-19-2009, 12:23 PM
I am currently developing a web app using struts 2. Now when it comes to the registration page I am unsure whether to use javascript validation or use the framework that struts provides. I know I am much more comfortable doing it in struts as my js isnt great. However will performance be better if I use js?
Also the validation of the username is going to have to be compared against other usernames on the server for uniqueness (which I will do via jstl sql). This makes me even more inclined to using struts validation.
Please let me know your thoughts. thanks

vik111
08-19-2009, 12:35 PM
after reading the thread here: http://forums.devarticles.com/the-lizard-lounge-10/client-side-vs-server-side-validation-3295.html I am definetley going with server side. disabling js and mainpulating the form is not a good look!!!

JavaServlet
08-19-2009, 08:40 PM
For Struts I wouldnt use JSTL SQL tags, especially for large scale apps where you should use an MVC approach. The struts controller also allows for better error handling etc.. JSTL SQL tags if needed are good for very simple apps and quick prototypes.