You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "PILGRIM, Peter, FM" <Pe...@rbos.com> on 2003/01/27 10:44:48 UTC
Struts and JSTL
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?
--
Peter Pilgrim,
Struts/J2EE Consultant, RBoS FM, Risk IT
Tel: +44 (0)207-375-4923
***********************************************************************
Visit our Internet site at http://www.rbsmarkets.com
This e-mail is intended only for the addressee named above.
As this e-mail may contain confidential or privileged information,
if you are not the named addressee, you are not authorised to
retain, read, copy or disseminate this message or any part of it.
The Royal Bank of Scotland plc is registered in Scotland No 90312
Registered Office: 36 St Andrew Square, Edinburgh EH2 2YB
Regulated by the Financial Services Authority
***********************************************************************
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
RE: Struts and JSTL
Posted by Jerome Jacobsen <je...@gentootech.com>.
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:craigmcc@apache.org]
> 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:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: Struts and JSTL
Posted by "Craig R. McClanahan" <cr...@apache.org>.
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: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>