You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Cornellious Mann <co...@yahoo.com> on 2003/12/02 00:44:17 UTC

Trouble With Multiple Message Resources Bundles

I am having trouble accessing a message from my
"non-default" message bundle.

I have the following entries in my struts-config.xml
file...

<message-resources
parameter="com.it.rfr.resources.rfrresources">
</message-resources>

<message-resources key="shared"
parameter="com.it.shared.resources.sharedresources">
</message-resources>

I then try to access a message in the "shared" bundle"
using this tag...

<bean:message bundle="shared"
name="com.it.label.error400Title"/>

When I do this, I get the following error...

javax.servlet.jsp.JspException: Missing message for
key "com.it.label.error400Title"

I have researched the archives and have not found any
sufficient reasons as to why this doesn't work.  All
of the Struts documentation reads like this should
work.

I did see one or two message indicating this could be
a problem

Does anyone have any ideas?

 


=====
Best Regards,
Cornellious Mann

__________________________________
Do you Yahoo!?
Free Pop-Up Blocker - Get it now
http://companion.yahoo.com/

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


Re: Trouble With Multiple Message Resources Bundles

Posted by Hubert Rabago <ja...@yahoo.com>.
I haven't used the multi bundles before, but I remember recently someone saying
the order by which s/he declared the resources solved the problem:

<message-resources key="approvals" parameter="com.myapp.one" /> 
<message-resources key="org.apache.struts.action.MESSAGE"
parameter="com.myapp.two" /> 

instead of 

<message-resources key="org.apache.struts.action.MESSAGE"
parameter="com.myapp.two" /> 
<message-resources key="approvals" parameter="com.myapp.one" /> 

don't know if that helps.

Hubert

--- Cornellious Mann <co...@yahoo.com> wrote:
> I am having trouble accessing a message from my
> "non-default" message bundle.
> 
> I have the following entries in my struts-config.xml
> file...
> 
> <message-resources
> parameter="com.it.rfr.resources.rfrresources">
> </message-resources>
> 
> <message-resources key="shared"
> parameter="com.it.shared.resources.sharedresources">
> </message-resources>
> 
> I then try to access a message in the "shared" bundle"
> using this tag...
> 
> <bean:message bundle="shared"
> name="com.it.label.error400Title"/>
> 
> When I do this, I get the following error...
> 
> javax.servlet.jsp.JspException: Missing message for
> key "com.it.label.error400Title"
> 
> I have researched the archives and have not found any
> sufficient reasons as to why this doesn't work.  All
> of the Struts documentation reads like this should
> work.
> 
> I did see one or two message indicating this could be
> a problem
> 
> Does anyone have any ideas?
> 
>  
> 
> 
> =====
> Best Regards,
> Cornellious Mann
> 
> __________________________________
> Do you Yahoo!?
> Free Pop-Up Blocker - Get it now
> http://companion.yahoo.com/
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
> 


__________________________________
Do you Yahoo!?
Free Pop-Up Blocker - Get it now
http://companion.yahoo.com/

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