Perhaps an Adapter could be created to do this (e.g.
MessageResourcesLocaleContext or StrutsLocaleContext).  You could set it up
to be your default LocaleContext in the web.xml or via a Struts PlugIn.  I
haven't actually looked to see if a Struts MessageResources could be adapted
to a JSTL LocaleContext.  The APIs may be too different.  But maybe not.

Anyway the advantage would be that the Adapter is a light-weight object so
you don't have the problem of loading all the resources into memory twice as
you do with both loading the MessageResources and the ResourceBundle.

Such an Adapter could live in the Struts 1.1 contrib along with Struts-EL.

> -----Original Message-----
> From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
> Sent: Monday, January 27, 2003 3:53 PM
> To: Struts Users Mailing List
> Subject: Re: Struts and JSTL <fmt:setBundle>
>
>
>
>
> On Mon, 27 Jan 2003, PILGRIM, Peter, FM wrote:
>
> >
> > Struts has a i18n implementation that predates JSTL version.
> > I was wondering how to use the Struts application properties
> > with the JSTL <fmt:bundle>? The obvious answer is point
> > JSTL bundle to load the Struts message bundle. In other have
> > two resource bundles in memory. However, is there any
> > plans to make MessageResources implement the
> > `javax.servlet.jsp.jstl.fmt.LocaleContext' directly?
> >
>
> Short answer - no.
>
> Reason - that would introduce a dependency on JSTL, which in turn would
> introduce a dependency on JSP 1.2 and Servlet 2.3, which would be a
> problem for more than a few users who are using JSP 1.1 / Servlet 2.2
> containers.  We cannot introduce dependencies like this without updating
> the baseline version dependency as well.
>
>
> Craig
>
>
>
>
> --
> 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]>

Reply via email to