Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Call JSP function from JSTL (c out)

843840Sep 23 2008 — edited Sep 26 2008
Hi everyone,

I hope someone is able to help me with this problem.

I have an JSP that loops through a ArrayList and displays the information. One of the fields have a Date() attribute. I want to call a DateUtil function to format the date.
<c:forEach var="entry" items="${donation.logs}">
   <tr>
     <td><%= dateUtils.formatDate(${entry.receivedTimestamp})%></td>
     <td>$<c:out value="${entry.donation}"/></td>
   </tr>
</c:forEach>
So basically i want to pass the "${entry.receivedTimestamp}" to the "dateUtils.formatDate()" function.

How is this done? Is there a better way to do this? Any ideas and help is very welcome!

Thanks in advance

Kasper
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 24 2008
Added on Sep 23 2008
3 comments
1,127 views