in your struts-config.xml: <!-- this is now your default resource bundle --> <message-resources parameter="com.myapp.one"/> <message-resources parameter="com.myapp.two" key="MESSAGE_TWO"/> in your jsps: <bean:message key="errors.header"/> <bean:message key="approval.001" bundle="MESSAGE_TWO"/>
From: Ashish Kulkarni <[EMAIL PROTECTED]> Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]> To: Struts Users Mailing List <[EMAIL PROTECTED]> Subject: Re: how to use 2 resource files in one struts-config.xml? Date: Wed, 29 Oct 2003 08:56:53 -0800 (PST)
Hi, some how <bean:message key="approval.001" bundle="message1"/> does not work i still get the missing resource error, how do i define the default bundle?? i am not using struts module Ashish --- Manish Singla <[EMAIL PROTECTED]> wrote: > You may try following (from your example) > <bean:message key="approval.001" bundle="message1"/> > where bundle attribute maps to key attribute in > <message-resources ... > tag > > You may have one default bundle. > Thus for default bundle ...no need to give key in > <message-resouces > ...tag.. > for that bundle corresponding <bean:message > will > be without bundle > attributes follows > <bean:message key="approval.001"> > > I assume you are not using struts modules...and is > not trying to access > message resources bundle of different bundle.. > > > Ashish Kulkarni wrote: > > > 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] > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] >
__________________________________ 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]