jdk-1.7.0_51プラットフォームでtomcat-7.0.42のwindows 7私の JSP ページの使用:
<fmt:formatDate value='${abtest.modifiedDate}' pattern="yyyy-MM-dd HH:mm:ss"/>
ここで、abtest.modifiedDate属性はタイプjava.util.Dateであり、インスタンスで初期化されjava.sql.Timestampます。
次の例外をスローします。
javax.servlet.jsp.JspException: javax.el.ELException: Cannot convert 1/24/14 4:31 PM of type class java.sql.Timestamp to class org.joda.time.DateTime
abtest.modifiedDate属性が初期化されorg.joda.time.DateTimeておらず、すべての環境で発生するわけではないため、エラーは奇妙に思えます。
また、タグで: を置き換えようとしましたが、別のエラーが発生しまし<fmt:formatDate...た:<joda:format ...
javax.servlet.jsp.JspException: javax.servlet.jsp.JspException: value attribute of format tag must be a ReadableInstant or ReadablePartial, was: java.sql.Timestamp