简体   繁体   中英

Nested JSTL Tags

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. :)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM