jstl solution: in your jsp: ----------------------------------------------------------------------------------------------------- <fmt:setBundle basename="com.myapp.one" var="oneProps"/> <fmt:setBundle basename="com.myapp.two" var="twoProps"/>
<fmt:message key="errors.header" bundle="${oneProps}"/>
<fmt:message key="approval.001" bundle="${twoProps}"/> ------------------------------------------------------------------------------------------------------ you probably also want to declare a default resource in your deployment descriptor(web.xml) as such:
<context-param>
<param-name>javax.servlet.jsp.jstl.fmt.localizationContext</param-name>
<param-value>com.myapp.one</param-value>
</context-param>
now you can access the default in the jsp without specifying a bundle: <fmt:message key="errors.header"/>
-Ben
From: Ashish Kulkarni <[EMAIL PROTECTED]> Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]> To: [EMAIL PROTECTED] Subject: how to use 2 resource files in one struts-config.xml? Date: Wed, 29 Oct 2003 08:00:46 -0800 (PST)
Hi I have 2 message resource files, com.myapp.one.properties and com.myapp.two.properties I haev some messages in one and some messages in two, and want to display these in jsp and in action class etc how do i define them in my struts-config.xml and use them with <bean:message...> tag. This is what i am trying but is not working <message-resources key="org.apache.struts.action.MESSAGE" parameter="com.myapp.one" /> <message-resources key="message1" parameter="com.myapp.two" />
and in my jsp i have <bean:message key="errors.header"/> , where errors.header is defines in one.properties and <bean:message key="approval.001"/> which is defines in two.properties file i also tried <bean:message key="message1.approval.001"/> but does not work Ashish
__________________________________ Do you Yahoo!? Exclusive Video Premiere - Britney Spears http://launch.yahoo.com/promos/britneyspears/
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
_________________________________________________________________
Fretting that your Hotmail account may expire because you forgot to sign in enough? Get Hotmail Extra Storage today! http://join.msn.com/?PAGE=features/es
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]