Search This Blog

Thursday, June 15, 2006

What is the purpose all xml files in struts?

1. tiles-def.xml
tiles-def.xml is used as a configuration file for an appliction during tiles developmentYou can define the layout / header / footer / body content for your View.

2. validation.xml
The validation.xml file is used to declare sets of validations that should be applied to Form Beans.Each Form Bean you want to validate has its own definition in this fileInside that definition, you specify the validations you want to apply to the Form Bean's fields.

3.In struts-config.xml
we define Date Sources / Form Beans / Global Exceptions / Global Forwards / Action Mappings / Message Resources / Plug-ins

4. Resourcebundle.properties
Instead of having hard-coded error messages in the framework, Struts Validator allows you to specify a key to a message in the ApplicationResources.properties (or resourcebundle.properties) file that should be returned if a validation fails.

5.ApplicationResources.properties
errors.registrationForm.name={0} Is an invalid name.In the registrationForm.jsp

No comments: