struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Corey Probst <cpr...@gmail.com>
Subject Re: Validator with more than one module
Date Fri, 11 Mar 2005 21:43:11 GMT
By adding a comma separated list of struts config files, you are not
specifying multiple *modules*, just multiple config files. 
ValidatorResources are stored in the ServletContext after being read
by the plugin.  So, when struts-config-two is read, it overwrites the
info stored for struts-config-one.

To specify multiple modules you need to declare in the ActionServlet
init params something like this...
<init-param>
   <param-name>config</param-name>
   <param-value>/WEB-INF/struts-config-one.xml</param-value>
</init-param>
<init-param>
   <param-name>config/module1</param-name>
   <param-value>/WEB-INF/struts-config-two.xml</param-value>
</init-param>

Corey

This link describes both ways (multiple config files and modules)...
http://struts.apache.org/userGuide/configuration.html

> I'm trying to use the validator with one that more Struts module, but
> I've found that if you've more than one module, only one of them load
> the validation xmls correctly, the others don't.
> 
> Having this in the web.xml
> 
> /WEB-INF/struts-config-one.xml, /WEB-INF/struts-config-two.xml:

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message