In a jsp i would like to display the date of the year
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<jsp:useBean id="date" class="java.util.Date" pattern="yyyy" />
<fmt:formatDate value="${date}" />
but i get
for servlet jsp threw exception
java.lang.IllegalArgumentException: Cannot convert 4/22/14 5:23 PM of type class java.util.Date to Number
i saw on How to print current date in JSP? this is the way to go
so i don't really understand.