tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Brunkhart <m...@matchanalysis.com>
Subject JSTL bug report: fmt:bundle does not deliver correct results when using prefix attribute
Date Wed, 24 Sep 2003 00:39:14 GMT
fmt:bundle does not appear to work correctly when used with the prefix 
attribute (see test case below).  When accessing the jsp, the first access 
delivers the expected result from the resource bundle "Este es una prueba". 
 Loading the page a second time (and all future times) yields the result 
"???testmessage???"

I believe this is not the correct functionality.  It works fine if instead 
of using the prefix attribute, you include the prefix in the key of the 
<fmt:message> tag.

---test.jsp
<%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt" %>

<html xmlns:v="urn:schemas-microsoft-com:vml">
  <head>
  </head>

  <fmt:setLocale value="es" />
  <fmt:bundle basename="test" prefix="com.whatever.messages."  >
    <body style="link:#ccc;active:#ccc;visited:#aaa;hover:#fff">
      <fmt:message key="testmessage" />
    </body>
  </fmt:bundle>
</html>

----test_es.properties
com.whatever.messages.testmessage=Este es una prueba



Mime
View raw message