开发者

Nested JSTL Tags

开发者 https://www.devze.com 2023-01-07 19:12 出处:网络
I want to use a formatDate tag inside a param tag.开发者_运维问答This doesn\'t work: <fmt:message key=\"entry\">

I want to use a formatDate tag inside a param tag.开发者_运维问答 This doesn't work:

<fmt:message key="entry">
   <fmt:param value="<fmt:formatDate value='${entry.time}' pattern='h:mm' />"/>
</fmt:message>

How can I do this?


You can use the body content of fmt:param

Like this:

<fmt:message key="entry">
  <fmt:param><fmt:formatDate value='${entry.time}' pattern='h:mm' /></fmt:param>
</fmt:message>

This should do what you want. :)

0

精彩评论

暂无评论...
验证码 换一张
取 消