You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Menke, John" <Jo...@acs-inc.com> on 2003/07/28 18:20:35 UTC

Struts 1.1 questions

We have an app that is broken down into sub-apps.
Within the struts-config.xml file (defined in the web.xml as being the
"default" app) I have this entry:
<message-resources parameter="com.acs.cfs.kidstar.web.KidstarResources"/>
Within a sub-app's config file I have the following entries:
<message-resources parameter="com.acs.cfs.kidstar.web.KidstarResources"/>
<message-resources
parameter="com.acs.cfs.kidstar.web.casemgmt.CasemgmtResources" />
<message-resources key="MESSAGE"
parameter="com.acs.cfs.kidstar.web.casemgmt.CasemgmtMessages" />
Questions are this.
1) While in a jsp of a sub-app, if someone looks up a message WITHOUT using
the "bundle" attribute and it is not found in the sub-app's default resource
bundle (ie: <html:messages id="message" message="true"
header="messages.header" footer="messages.footer"> )
will Struts look to the applications default msg-resource's file for that
key? (For example with what I've defined above if key "foomsg" isn't found
in the com.acs.cfs.kidstar.web.casemgmt.CasemgmtResources file, will it go
to the "com.acs.cfs.kidstar.web.KidstarResources" file to look for it?
It appears to not be the case.
2) Is it possible to have what I've got in the sub-app config file - that
being 2 "default" resources (both without the "key" attribute)? It seems
that Struts does not complain about this but it only takes the last entry in
the list for the default resource. What I really want to happen is, look in
KidstarResources and if not found look in CasemgmtResources. (Of course if 2
files contain the same key there'd need to be a pecking order of who is used
first, in my case I don't have msgkeys that are contained in both files).
Thanks for any info on this.