Given the JSP document:

<root xmlns:c="http://java.sun.com/jsp/jstl/core";
      xmlns:fmt="http://java.sun.com/jsp/jstl/fmt";
      xmlns:jsp="http://java.sun.com/JSP/Page";>

    <jsp:output omit-xml-declaration="false"/>
    <c:set var="key" value="msg"/>

<msg><fmt:bundle basename="AltMessages"><fmt:message key="${key}"/></fmt:bundle></msg>

<msg><fmt:message key="${key}"/></msg>

</root>

With property files:

Messages.properties:
msg=Messages

AltMessages.properties:
msg=AltMessages

And a web.xml element:

<context-param>
  <param-name>javax.servlet.jsp.jstl.fmt.localizationContext</param-name>
  <param-value>Messages</param-value>
</context-param>

TC 5.0.18 with Standard taglib 1.1.0-B1 generates:

<?xml version="1.0" encoding="UTF-8"?>
<root><msg>AltMessages</msg><msg>Messages</msg></root>

Which seems to work properly.

[EMAIL PROTECTED] wrote:
They're not typos, it's iPowerWeb mucking with my email.
OK, it works now.  I suppose I should submit a bug report?
Any pointers besides use common sense?

Thanks, Rick DeBay

On Thu, 29 Jan 2004 14:42 , Kris Schneider <[EMAIL PROTECTED]> sent:


There are some typos in your example, are they just c/p errors? I think the span
should look like:


title=" key="${website.siteType}"/>">



Otherwise, if you think it's a pooling bug, you can turn it off in
$CATALINA_HOME/conf/web.xml. Look for:


jsp org.apache.jasper.servlet.JspServlet ...


and add the following init param:



enablePooling false


Quoting [EMAIL PROTECTED]:



Sorry, my [EMAIL PROTECTED] provider reset my webmail to HTML composition.  Let me try
again:

I'm using JSTL 1.1 on Tomcat 5.0, and fmt:bundle is changing the bundle for
the
entire page, not just for fmt:message tags in its body.
My web.xml:
javax.servlet.jsp.jstl.fmt.fallbackLocale
en
javax.servlet.jsp.jstl.fmt.localizationContext
directory


The offending snippet of JSP:

--%>
basename="glossary>
key="${website.siteType}"/>">



The same text appears in the title and between the spans, even if I enclose the second fmt:message in its own fmt:bundle with a different basename in order to work-around this problem. I'm guessing this is a problem with tag reuse. Can anyone reproduce this, point me to a bug report, or suggest a work-around?

Thanks, Rick DeBay

-- Kris Schneider [EMAIL PROTECTED]','','','')">[EMAIL PROTECTED]> D.O.Tech http://www.dotech.com/>

-- Kris Schneider <mailto:[EMAIL PROTECTED]> D.O.Tech <http://www.dotech.com/>



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



Reply via email to