Thursday, April 2, 2009

Struts - DynaForm validation

It is difficult to handle validator framework, if you are new Very Happy to struts.

I have also spent lot to time to learn it, so now finally I done it.

I will give you step by step of using dyna form validation. It is simple server side dynaform action validation or and client side validation with source code.

1. Open struts-config.xml file and do entries
2. Make validation.xml file in WEB-INF folder
3. Create validator-rules.xml in WEB-INF folder.
4. Create action class according to your requirement.
5. Create ApplicationResources.properties file in your package.
6. Last finally create a jsp file where you want to show your errors.

This example using struts 1.2 jars. So do little care of DTD tld standards. And version of it struts 1.1 use different and struts 1.3 use different one.


More Details

No comments:

Post a Comment

Followers