<jsp:useBean id="now" class="java.util.Date" />
Or you can parse a string date into a date object
<fmt:parseDate var="mydate" pattern="yyyy-MM-dd">${stringHoldingDate}</fmt:parseDate>Now format it as you like (calling formatDate will return the formatted date as a string, place the code inside a <c:set></c:set> to set as a variable; otherwise, it will print out to the screen):
<fmt:formatDate value="${now}" type="both" pattern="MM/dd/yyyy HH:mm:ss" />You must use type=both otherwise the time will not be parsed, even if the format contains it!