The simplest way to format a date type field in JSTL is to use a formatDate tag. Example:

<fmt:formatDate value="${row[1]}"/>

 This will display a date value in the default format which is MMM-D-YYYY on my Windows XP machine. You can use various attributes such as dateStyle, timeStyle and pattern to customize the date display format.

You can use any of the values default, short, medium, long, or full for the dateStyle attribute.

 This is how you format both date and time using the current date:

 <jsp:useBean id="now" class="java.util.Date" />
 Date : <fmt:formatDate type="both" value="${now}" dateStyle="medium" timeStyle="short"/>
 

A pattern example:

<fmt:formatDate pattern="MMM dd yyyy, HH:mm:ss" value="${row[1]}"/>

In a similar fashion, it’s very easy to format a number as currency in JSTL. Example:

<fmt:formatNumber value="${row[2]}" type="currency"/> 

 One of the best books on JSTL is written by Shawn Bayern, the reference implementation lead for JSTL.