JSTL <fmt:formatDate> issue on newer tomcat

Imgur

Quick note about this issue. It happens when you're basically want to switch to the newer version of Tomcat. In our case it was switch from Tomcat6 to Tomcat7.

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>  
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>  
<html>  
<body>  
     <jsp:useBean id="date" class="java.util.Date" />
     <fmt:formatDate pattern="yyyy-MM-dd" value="${date}"/>
</body>  
</html>  

Ends up with an error when you're switching from Tomcat6 to Tomcat7:

org.apache.jasper.JasperException: Unable to convert string "${date}" to class "java.util.Date" for attribute "value": Property Editor not registered with the PropertyEditorManager

org.apache.jasper.runtime.JspRuntimeLibrary.getValueFromPropertyEditorManager(JspRuntimeLibrary.java:887)  
     org.apache.jsp.index_jsp._jspx_meth_fmt_005fformatDate_005f0(index_jsp.java:135)
     org.apache.jsp.index_jsp._jspService(index_jsp.java:86)
     org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
     javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
     org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
     org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
     org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
     javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

The fix for this problem is simple, just don't use legacy schemas. Modify web.xml file, like below.
Before changes:

<!DOCTYPE web-app PUBLIC  
        "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
        "http://java.sun.com/dtd/web-app_2_3.dtd" >

<web-app id="WebApp_ID" version="2.4"  
         xmlns="http://java.sun.com/xml/ns/j2ee"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
    http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
    <!-- more code below -->
</web-app>  

After changes:

<web-app  
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns="http://java.sun.com/xml/ns/javaee"
    xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
    id="WebApp_ID"
    version="2.5">
    <!-- more code below -->
</web-app>  

Reload the app. And everything works as expected for now.