You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Ashish Kulkarni <as...@gmail.com> on 2009/06/15 22:23:52 UTC

Struts validation with multiple struts-config.xml file (struts 1.2.6)

HiI am having issues with struts validation when i have more then one
struts-config.xml file defined in web.xml

Struts performs no validation for the rules i have in validation.xml file,
which is part of struts-config.xml, but if i remove struts-config-admin.xml
from web.xml then it performs the required validation.

Question is
Can i not define plug-in tag in both configuration files?


here is my setup

in web.xml, i have defined 2 XML files as below
              <init-param>
<param-name>config</param-name>
<param-value>
/WEB-INF/struts-config.xml,/WEB-INF/struts-config-admin.xml
</param-value>
</init-param>

in strust-config.xml i have
<plug-in className="org.apache.struts.validator.ValidatorPlugIn">
<set-property
value="/WEB-INF/validator-rules.xml,/WEB-INF/validation.xml"
property="pathnames" />
</plug-in>

and in struts-config-admin.xml i have

<plug-in className="org.apache.struts.validator.ValidatorPlugIn">
<set-property
value="/WEB-INF/validator-rules.xml,/WEB-INF/validation_base.xml"
property="pathnames" />
</plug-in>