Also, VelocityTools has a ValidatorTool that should help you with this. On 7/19/05, Mikko Nylén <[EMAIL PROTECTED]> wrote: > Paul Goepfert wrote: > > > I created a web app using velocity and struts. I have used the > > velstruts package in my implementation. I now want to add error > > checking to my app. I am not sure how to do it. Should I be doing the > > error checking on the velocity or struts side of the implementation? > > > > -Paul > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > I think you should do form validation in your ActionForm's validate() > method, or use Validator framework (via Struts plugin). > > At Velocity side you are limited to only display form validation errors > and do client-side validation using JavaScript, which isn't quite > effective taking in account that not everyone has JavaScript enabled. > So, if you prefer to inform users about possible errors before sending > forms, include also client-side validation using JavaScript, but do not > forget the server-side validation. As far as I know, it's quite easy to > add both client- and server-side validations with Validator framework. > > - Mikko Nylén > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
