Bug 29551 - problem with simple quote in fmt:message with parameter
Summary: problem with simple quote in fmt:message with parameter
Status: RESOLVED INVALID
Alias: None
Product: Taglibs
Classification: Unclassified
Component: Standard Taglib (show other bugs)
Version: 1.0
Hardware: PC Windows XP
: P3 blocker (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-06-14 08:52 UTC by Dutrieux Olivier
Modified: 2004-11-16 19:05 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.