This application uses something like module, but I don't think it's module. I 
think they use multiple struts configuration files (single module).
 
This is a part of the web.xml:
 
  <servlet> 
    <servlet-name>action</servlet-name>
    <servlet-class>com.xhmh.dcis.common.DCISActionServlet</servlet-class>
    <init-param>
      <param-name>config</param-name>
      
<param-value>/WEB-INF/struts-config.xml,/WEB-INF/struts-config-consumer.xml,/WEB-INF/struts-config-mmis.xml,/WEB-INF/struts-config-maintenance.xml,/WEB-INF/struts-config-workflow.xml,/WEB-INF/struts-config-attendance.xml,/WEB-INF/struts-config-payments.xml,/WEB-INF/struts-config-reports.xml,/WEB-INF/struts-config-rates.xml,/WEB-INF/struts-config-provider.xml,/WEB-INF/struts-config-admin.xml</param-value>
    </init-param>

As far as I know, if we use multiple modules, the web.xml should look like:
 
<servlet>
<servlet-name>action</servlet-name>
<servlet-class>
org.apache.struts.action.ActionServlet
</servlet-class>
<init-param>
<param-name>config</param-name>
<param-value>
/WEB-INF/struts-default-config.xml,
/WEB-INF/struts-default-config-2.xml
</param-value>
</init-param>
<init-param>
<param-name>config/module1</param-name>
<param-value>
/WEB-INF/struts-module1-config.xml
</param-value>
</init-param>
<init-param>
<param-name>config/module2</param-name>
<param-value>
/WEB-INF/struts-module2-config.xml,
/WEB-INF/struts-module2-config-2.xml,
/WEB-INF/struts-module2-config-3.xml
</param-value>
</init-param>
 
So in my case, is it possible to tell Struts to get the value for a particular 
key in <arg0> from some properties file?
 
 

>>> [EMAIL PROTECTED] 8/11/2005 3:52:05 PM >>>

Thai Dang U wrote:
> I have many struts config files in my application. One of them is 
> struts-config-provider.xml. In this file, I declare a resource file and 
> validation files like this:
>  
> <message-resource key="provider" parameter="Provider"/>
> <plug-in className="org.apache.struts.validator.ValidatorPlugin">
>     <set-property property="pathnames"
>                         value="/WEB-INF/provider/conf/validation.xml, 
> /WEB-INF/provider/conf/validator-rules.xml"/>
> </plug-in>
>  
> In my validation.xml file, I have several lines like <arg0 key="form1.name"/> 
> What do I have to do to tell Struts to use form1.name in my resource bundle 
> (Provider.properties)?
>  
> Thanks for any help.

Are you using modules? If so, and struts-config-provider.xml is configured 
correctly in web.xml (on the ActionServlet definition), you shouldn't need 
to do anything special. I'm not sure how it works if you're using multiple 
configuration files without modules, though.

L.
-- 
Laurie Harper
Open Source advocate, Java geek: http://www.holoweb.net/laurie 
Founder, Zotech Software: http://www.zotechsoftware.com/ 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED] 
For additional commands, e-mail: [EMAIL PROTECTED] 




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to