When using the JSTL (ver 1.0.2) fmt taglib with tomcat 4.1.2 (the tomcat that comes with Java Web Services DevKit), everything works nicely. However, when I switched to tomcat 4.1.18, only the very first resource message is displayed correctly while subsequent calls to fmt:message shows ????key2????. My browser is Netscape 7.0.1. My code segment is as follows: <html> <title>Test JSP</title> <%@ taglib uri="/jstl-fmt" prefix="fmt" %> <fmt:bundle basename="resources.DisplayMessages"> <fmt:message key="key1"/> <fmt:message key="key2"/> <fmt:message key="key3"/> </fmt:bundle> </html> On tomcat 4.1.2, output is: value1 value2 value3 On tomcat 4.1.18, output is: value1 ????key2???? ????key3???? If I do another request to this jsp page, on tomcat 4.1.18, all output becomes ????key????. I'm using the same war file for both tomcat versions and the resource file, DisplayMessages.properties, is located in the WEB-INF/classes/resources directory.
I tested with JSTL 1.0.2/Tomcat 4.1.18, and it worked for me. If you still have a problem after checking your setup, could you attach the simplest war possible that triggers the problem, and I'll test with that.
Created attachment 4707 [details] war file that reproduces the jstl 1.0.2 fmt resourcing issue with tomcat 4.1.18 (case 16535)
Attached a simple war file that reproduces this problem. After deploying, use http://host:port/jstlfmttest/testjsp to access the test case. I am using tomcat 4.1.18 right after installation without any changes to the configuration/setup. Note: ===== If I switched to using <fmt:setBundle basename="resources.DisplayMessages"/> instead of <fmt:bundle basename="resources.DisplayMessages" prefix="test."> ,I can get the jsp to work for both tomcat 4.1.2 and 4.1.18.
Thanks for the attachment Eric. Indeed, I could reproduce the bug. The good news though is that this bug has already been taken care of when we fixed bug 14695. If you use the nightly build of JSTL, everything should work fine.