The application (consists of 5 small apps) that we currently have, has 5 struts-config files. The 5th struts-config xml is mentioned as the last in web.xml. Because of this, we are having to specify the validation xmls used in all the 5 apps. Because of this, the first app's validation xml entry resides in the fifth app's validation plug-in entry which is bad.
Will the use of
Struts Modules help in eliminating this dependence?
Is it a good practice to create a new struts-config file for holding the validation xml entries alone?
What other approach can be done to eliminate this? Please help...
______________________________________
I have the following struts-config & validation xml files...
1) mf-struts-config.xml & mf-validation.xml
2) ky-struts-config.xml & ky-validation.xml
3) co-struts-config.xml & co-validation.xml
4) br-struts-config.xml & br-validation.xml
5) ct-struts-config.xml & ct-validation.xml
In web.xml i have the following entry..
<param-value>
/WEB-INF/config/mf/mf-struts-config.xml,
/WEB-INF/config/ky/ky-struts-config.xml,
/WEB-INF/config/co/co-struts-config.xml,
/WEB-INF/config/br/br-struts-config.xml,
/WEB-INF/config/ct/ct-struts-config.xml
</param-value>
Since i am loading the ct-struts-config.xml as the last, i am having to mention entries for all the validation xml into the validator plugin's 'pathnames' property. Otherwise, whatever xml i miss, the corresponding validations do not happen.
The same problem exists for the .properties file as well...
So I created a new struts-config file to hold the validation xml files.
Due to time constraints to
test the entire app, we are not for creating a module for every single app...
Why is this dependence? Why doesnt it work when we have every validation xml in the corresponding struts xml??
Will only one instance of the validator plug-in be created? Is that why the 'pathnames' property is being over written every time a struts config file is loaded?
[ September 04, 2008: Message edited by: Easwar Murthi ]
[ September 04, 2008: Message edited by: Easwar Murthi ]
[ September 04, 2008: Message edited by: Easwar Murthi ]