-2
SEVERE: Servlet.service() for servlet jsp threw exception
org.apache.jasper.JasperException: Unable to convert string "${user.dob}" to class "java.util.Date" for attribute "value": Property Editor not registered with the PropertyEditorManager
    at org.apache.jasper.runtime.JspRuntimeLibrary.getValueFromPropertyEditorManager(JspRuntimeLibrary.java:884)
    at org.apache.jsp.WEB_002dINF.user_jsp._jspx_meth_fmt_005fformatDate_005f0(user_jsp.java:183)
    at org.apache.jsp.WEB_002dINF.user_jsp._jspService(user_jsp.java:96)
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
    at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:369)
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:308)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:259)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
    at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:659)
    at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:457)
    at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:395)
    at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:311)
    at com.daniel.controller.UserController.doGet(UserController.java:50)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:879)
    at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
    at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
    at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
    at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
    at java.lang.Thread.run(Unknown Source)
4

2 回答 2

1

请确保您在 taglib 指令中指定了正确的 uri。确保您指定:

<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>.

代替:

<%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt"%>

并指定:

<%@ page isELIgnored="false" %>
于 2014-02-23T10:48:57.793 回答
0

使用'${user.dob}'而不是 ."${user.dob}"它被视为一个字符串

于 2013-05-23T12:16:35.120 回答