You can use the <fmt:message> tag without the bundle tag. You configure the default bundle in web.xml like this:

<context-param>
<param-name>javax.servlet.jsp.jstl.fmt.localizationContext</param-name>
<param-value>com.yourcorp.MessageResources</param-value>
</context-param>

I believe you can use the <fmt:bundle> tag at the top of a page to set the bundle for the message tags if you need something besides the default.

David





From: "Dan Tran" <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Subject: Re: JSTL equivalent of bean:message
Date: Wed, 20 Nov 2002 16:18:58 -0800

Well, I just answ. my own question

Here is the format

<fmt:bundle basename="my.app.Messages" >
<fmt:message key="xxx.yyyy" />
</fmt:bundle>

I like the strut beantag better since it is shorter.

-D
----- Original Message -----
From: "Dan Tran" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Wednesday, November 20, 2002 3:29 PM
Subject: Re: JSTL equivalent of bean:message


> Sorry if this is trivial?
>
> How do I find out the name of "applicationResource"?
>
> My app is a subapp which has its own strutsconfig file.
> The Struts config file also has a message resource file
> (ie myapp.messages)
>
> Since It is on the topic of message resource, what is
> the purpose of "Message key" param in the message resource
> configuration?
>
> Thanks
>
> -D
>
> ----- Original Message -----
> From: "Karr, David" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> Sent: Wednesday, November 20, 2002 3:21 PM
> Subject: RE: JSTL equivalent of bean:message
>
>
> I haven't tried this, but perhaps something like this:
>
> <fmt:message key="xxx.yyyy" bundle="applicationResources"/>
>
> (where "applicationResources" is the name of your Struts application
> properties bundle.)
>
> > -----Original Message-----
> > From: Dan Tran [mailto:[EMAIL PROTECTED]]
> >
> > Someone claims on this group that they are able to
> > replace struts-bean tag for jstl. What is the
> > equivalent of
> >
> > <bean:message key="xxx.yyyy" />
>
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>

--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

_________________________________________________________________
The new MSN 8: advanced junk mail protection and 2 months FREE* http://join.msn.com/?page=features/junkmail


--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to