I have this code: <fmt:message key='message.diskFull'> <fmt:param value='${5}'/> </fmt:message> For this properties file: message.diskFull=Disk number <b>{0}</b> filled up at <b>{1, time}</b> on <b> {1, date}</b>. I get output like this: Disk number 5 filled up at {1} on {1}. But, the spec states: One <fmt:param> action must be specified for each variable in the compound message or message pattern. Because of that wording in the spec, I expected an error. Ok, now go ahead and tell me why this one's not a bug. ;-)
I agree this statement in section 8.8 (<fmt:param>): One <fmt:param> action must be specified for each variable in the compound message or message pattern. is misleading and should be removed. Maybe we can reword the 2nd paragraph as follows: Parametric replacement takes place in the order of the <fmt:param> tags. The compound message given by the parent <fmt:message> action is used as the argument to the applyPattern() method of a java.text.MessageFormat instance, and the values of the <fmt:param> tags are collected in an Object[] and supplied to that instance's format() method.