You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Paul Benedict <pb...@apache.org> on 2007/08/22 00:16:36 UTC

Re: Multiple application-resource property files in struts 1.1

I see you are not using modules. That's good. Your problem is caused by not
providing different aliases for the 3 MessageResources. Use the name
attribute to fix this. One is the default, the other should have names.

On 8/21/07, temp temp <mi...@yahoo.com> wrote:
>
>     I have  several struts-config-xml files .I mapped them in my web.xml.
>       Each  struts-config has its own  application-resources.
>
>       Action  servlet mapping in web.xml
>
>           <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-config-default.xml,
>                                /WEB-INF/struts-config-module-1.xml,
>                                /WEB-INF/ struts-config-module-2.xml,
>                   </param-value>
>               </init-param>
>               <init-param>
>                   <param-name>debug</param-name>
>                   <param-value>0</param-value>
>               </init-param>
>               <init-param>
>                   <param-name>detail</param-name>
>                   <param-value>0</param-value>
>               </init-param>
>               <load-on-startup>1</load-on-startup>
>           </servlet>
>
>       Each of the  struts-config files has message-resources
>       <message-resources
> parameter="struts-application-services"></message-resources>  from
> struts-config-default.xml
>       <message-resources
> parameter="struts-application-services-module-1"></message-resources> from
> struts-config-module-1.xml
>       <message-resources
> parameter="struts-application-services-module-2"></message-resources>  from
> struts-config-module-2.xml
>       My problem  is  Action servlet is loading  properties only
> from  struts-application-services-module-2 (from  the last property file it
> receives)
>       How can I have Action servlet load all properties from all  property
> files ?
>     Miro
>
> ---------------------------------
> Moody friends. Drama queens. Your life? Nope! - their life, your story.
> Play Sims Stories at Yahoo! Games.