How to display date as ISO8601 with JSTL?
Something like?
<fmt:formatDate value="${event.starttime}" type="both"/> Impossible AFAIK. You can use the pattern attribute:
<fmt:formatDate pattern="yyyy-MM-dd'T'HH:mm:ssz" value="${event.starttime}" /> But there is no template for generating ISO8601 without further processing. You must prepare your date on the server side and show it in your view.
You can find the Joda-Time library , as well as some blog posts, for example:
If you do not mind that all your dates will be in UTC (or in another hard-coded time zone after the change), you can use:
<fmt:formatDate value="${event.starttime}" pattern="yyyy-MM-dd'T'HH:mm:ss'Z'" timeZone="UTC"/>