You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Andrew Myers <ab...@iprimus.com.au> on 2002/03/08 06:20:38 UTC

Message resources for sub apps

Hi,

I'm just checking out the support for multiple apps in the nightly build 
and am trying to figure out the use of messages.

I have configured two apps as follows:

    <init-param>
      <param-name>config</param-name>
      <param-value>/WEB-INF/struts-config.xml</param-value>
    </init-param>
    <init-param>
       <param-name>config/app2</param-name>
       <param-value>/WEB-INF/app2-config.xml</param-value>
    </init-param>

The default app uses messages from ApplicationResources.properties and 
the sub app uses messages from App2Resources.properties

This all works very nicely assuming that the JSPs for app2 only want to 
access messages from App2Resources.  But can (and should?) they be 
allowed to access messages from the default app as well?

For example I'd like a JSP under the sub app to be able to access site 
wide messages (eg. the label "Submit" for a submit button which I have 
defined in ApplicationResources.properties) but as far as I can tell 
it's only looking for messages in App2Resources.  IMHO it'd be nice if 
it went to the default app to look for a message if it couldn't find it 
in the sub app.  That way you could either take them from the default 
app or "override" messages if required in the sub app.

Have I missed something here or is this something I should raise for 
discussion on the dev list?

Thanks,
Andrew.


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>