You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by bu...@apache.org on 2003/06/10 22:19:11 UTC
DO NOT REPLY [Bug 20660] New: -
Multiple Resource Bundle with Multiple struts modules
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=20660>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=20660
Multiple Resource Bundle with Multiple struts modules
Summary: Multiple Resource Bundle with Multiple struts modules
Product: Struts
Version: 1.1 RC1
Platform: PC
OS/Version: Windows NT/2K
Status: NEW
Severity: Normal
Priority: Other
Component: Unknown
AssignedTo: struts-dev@jakarta.apache.org
ReportedBy: kwave@caramail.com
I encountered a problem when using multiple struts config files.
This problem is encountered with Weblogic 6.1x and 7.0x.
The application module file(struts-config.xml) has the default resource bundle
(application.properties).
The admin module file(struts-config-admin.xml) has a different resource bundle
as default. (admin.properties).
I have a jsp page located under the admin folder and using the <bean:message>
without using a specified bundle. This should take the default bundle of the
module admin. However, it is only the first tag that will retrieve the value
from the default bundle of module and the rest from application module. All the
labels are in the admin.properties files.
If i specify the bundle. It is working.
Here is an example:
============ Web.xml ================
<web-app>
<servlet>
<servlet-name>action</servlet-name>
<servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
<init-param>
<param-name>application</param-name>
<param-value>resources.application</param-value>
</init-param>
<init-param>
<param-name>config</param-name>
<param-value>/WEB-INF/conf/struts/struts-config.xml</param-value>
</init-param>
<init-param>
<param-name>config/admin</param-name>
<param-value>/WEB-INF/conf/struts/struts-config-admin.xml</param-value>
</init-param>
======= Struts-config.xml ===========
<struts-config>
<message-resources parameter="resources.application" null="false" />
<message-resources parameter="resources.admin" key="admin" null="false" />
======= Struts-config-admin.xml ===========
<struts-config>
<message-resources parameter="resources.admin" null="false" />
<action-mappings>
<action forward="/test.jsp" path="/test"/>
</action-mappings>
============ admin.properties =============
billableitem.telco=Telco
billableitem.action=Action
=========== Test.jsp (located under the admin folder in the webapp)====
<%@ taglib uri="struts-bean.tld" prefix="bean" %>
<pre>
First value : <bean:message key="billableitem.telco"/>
Second value : <bean:message key="billableitem.action"/>
</pre>
================================
This results in
First value : Telco
Second value : ???en_US.billableitem.action???
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-dev-help@jakarta.apache.org