Bug 29551

Summary: problem with simple quote in fmt:message with parameter
Product: Taglibs Reporter: Dutrieux Olivier <dutrieux>
Component: Standard TaglibAssignee: Tomcat Developers Mailing List <dev>
Status: RESOLVED INVALID    
Severity: blocker    
Priority: P3    
Version: 1.0   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   

Description Dutrieux Olivier 2004-06-14 08:52:22 UTC
I try this in a JSP page :

<fmt:bundle basename="ApplicationResources" prefix="errorSession.">
  <fmt:message key="msg"><fmt:param value="30"/></fmt:message>
</fmt:bundle>

where in my property file : errorSession.msg=It's a error due to {0} minutes of
inactivity.

The result of my jsp page is : Its a error due to {0} minutes of inactivity

The problem is due to simple quote ('). Where I delete the simple quote that's
work perfectly. If I double the simple quote that work perfectly to.
But when there is not parameter in the message, the simple quote is display
correctly.

N.B: I use JSTL v1.0.5

best regards
Comment 1 Kris Schneider 2004-06-14 11:21:29 UTC
Please see the JavaDoc for MessageFormat:

http://java.sun.com/j2se/1.4.2/docs/api/java/text/MessageFormat.html

Specifically, the paragraph that begins, "Within a String, "''" represents a
single quote."

Your are seeing the expected behavior, use two single quotes.