java - Unterminated <form:input tag -
i want show data in data html tag on page. don't understand wrong @ line of jsp page
<form:input path="date" value ="<fmt:formatdate value="${existedevent.date}" pattern="yyyy-mm-dd"/>" type="date" ></form:input>
i see trace:
severe: servlet.service() servlet jsp threw exception org.apache.jasper.jasperexception: /web-inf/views/eventdetails.jsp (line: 24, column: 57) unterminated <form:input tag @ org.apache.jasper.compiler.defaulterrorhandler.jsperror(defaulterrorhandler.java:42) @ org.apache.jasper.compiler.errordispatcher.dispatch(errordispatcher.java:408) @ org.apache.jasper.compiler.errordispatcher.jsperror(errordispatcher.java:133) @ org.apache.jasper.compiler.parser.parseoptionalbody(parser.java:992) @ org.apache.jasper.compiler.parser.parsecustomtag(parser.java:1274) @ org.apache.jasper.compiler.parser.parseelements(parser.java:1452) @ org.apache.jasper.compiler.parser.parsebody(parser.java:1664) @ org.apache.jasper.compiler.parser.parseoptionalbody(parser.java:1002) @ org.apache.jasper.compiler.parser.parsecustomtag(parser.java:1274) @ org.apache.jasper.compiler.parser.parseelements(parser.java:1452) @ org.apache.jasper.compiler.parser.parse(parser.java:138) @ org.apache.jasper.compiler.parsercontroller.doparse(parsercontroller.java:242) @ org.apache.jasper.compiler.parsercontroller.parse(parsercontroller.java:102) @ org.apache.jasper.compiler.compiler.generatejava(compiler.java:198) @ org.apache.jasper.compiler.compiler.compile(compiler.java:373) @ org.apache.jasper.compiler.compiler.compile(compiler.java:353) @ org.apache.jasper.compiler.compiler.compile(compiler.java:340) @ org.apache.jasper.jspcompilationcontext.compile(jspcompilationcontext.java:646) @ org.apache.jasper.servlet.jspservletwrapper.service(jspservletwrapper.java:357) @ org.apache.jasper.servlet.jspservlet.servicejspfile(jspservlet.java:390) @ org.apache.jasper.servlet.jspservlet.service(jspservlet.java:334) @ javax.servlet.http.httpservlet.service(httpservlet.java:728) @ org.apache.catalina.core.applicationfilterchain.internaldofilter(applicationfilterchain.java:305) @ org.apache.catalina.core.applicationfilterchain.dofilter(applicationfilterchain.java:210) @ org.apache.catalina.core.applicationdispatcher.invoke(applicationdispatcher.java:749) @ org.apache.catalina.core.applicationdispatcher.processrequest(applicationdispatcher.java:487) @ org.apache.catalina.core.applicationdispatcher.doforward(applicationdispatcher.java:412) @ org.apache.catalina.core.applicationdispatcher.forward(applicationdispatcher.java:339) @ org.springframework.web.servlet.view.internalresourceview.rendermergedoutputmodel(internalresourceview.java:238) @ org.springframework.web.servlet.view.abstractview.render(abstractview.java:263) @ org.springframework.web.servlet.dispatcherservlet.render(dispatcherservlet.java:1208) @ org.springframework.web.servlet.dispatcherservlet.processdispatchresult(dispatcherservlet.java:992) @ org.springframework.web.servlet.dispatcherservlet.dodispatch(dispatcherservlet.java:939) @ org.springframework.web.servlet.dispatcherservlet.doservice(dispatcherservlet.java:856) @ org.springframework.web.servlet.frameworkservlet.processrequest(frameworkservlet.java:936) @ org.springframework.web.servlet.frameworkservlet.doget(frameworkservlet.java:827) @ javax.servlet.http.httpservlet.service(httpservlet.java:621) @ org.springframework.web.servlet.frameworkservlet.service(frameworkservlet.java:812) @ javax.servlet.http.httpservlet.service(httpservlet.java:728) @ org.apache.catalina.core.applicationfilterchain.internaldofilter(applicationfilterchain.java:305) @ org.apache.catalina.core.applicationfilterchain.dofilter(applicationfilterchain.java:210) @ org.springframework.security.web.filterchainproxy$virtualfilterchain.dofilter(filterchainproxy.java:330) @ org.springframework.security.web.access.intercept.filtersecurityinterceptor.invoke(filtersecurityinterceptor.java:118) @ org.springframework.security.web.access.intercept.filtersecurityinterceptor.dofilter(filtersecurityinterceptor.java:84) @ org.springframework.security.web.filterchainproxy$virtualfilterchain.dofilter(filterchainproxy.java:342) @ org.springframework.security.web.access.exceptiontranslationfilter.dofilter(exceptiontranslationfilter.java:113) @ org.springframework.security.web.filterchainproxy$virtualfilterchain.dofilter(filterchainproxy.java:342) @ org.springframework.security.web.session.sessionmanagementfilter.dofilter(sessionmanagementfilter.java:103) @ org.springframework.security.web.filterchainproxy$virtualfilterchain.dofilter(filterchainproxy.java:342) @ org.springframework.security.web.authentication.anonymousauthenticationfilter.dofilter(anonymousauthenticationfilter.java:113) @ org.springframework.security.web.filterchainproxy$virtualfilterchain.dofilter(filterchainproxy.java:342) @ org.springframework.security.web.servletapi.securitycontextholderawarerequestfilter.dofilter(securitycontextholderawarerequestfilter.java:54) @ org.springframework.security.web.filterchainproxy$virtualfilterchain.dofilter(filterchainproxy.java:342) @ org.springframework.security.web.savedrequest.requestcacheawarefilter.dofilter(requestcacheawarefilter.java:45) @ org.springframework.security.web.filterchainproxy$virtualfilterchain.dofilter(filterchainproxy.java:342) @ org.springframework.security.web.authentication.abstractauthenticationprocessingfilter.dofilter(abstractauthenticationprocessingfilter.java:183) @ org.springframework.security.web.filterchainproxy$virtualfilterchain.dofilter(filterchainproxy.java:342) @ org.springframework.security.web.authentication.logout.logoutfilter.dofilter(logoutfilter.java:105) @ org.springframework.security.web.filterchainproxy$virtualfilterchain.dofilter(filterchainproxy.java:342) @ org.springframework.security.web.context.securitycontextpersistencefilter.dofilter(securitycontextpersistencefilter.java:87) @ org.springframework.security.web.filterchainproxy$virtualfilterchain.dofilter(filterchainproxy.java:342) @ org.springframework.security.web.filterchainproxy.dofilterinternal(filterchainproxy.java:192) @ org.springframework.security.web.filterchainproxy.dofilter(filterchainproxy.java:160) @ org.springframework.web.filter.delegatingfilterproxy.invokedelegate(delegatingfilterproxy.java:346) @ org.springframework.web.filter.delegatingfilterproxy.dofilter(delegatingfilterproxy.java:259) @ org.apache.catalina.core.applicationfilterchain.internaldofilter(applicationfilterchain.java:243) @ org.apache.catalina.core.applicationfilterchain.dofilter(applicationfilterchain.java:210) @ org.apache.catalina.core.standardwrappervalve.invoke(standardwrappervalve.java:222) @ org.apache.catalina.core.standardcontextvalve.invoke(standardcontextvalve.java:123) @ org.apache.catalina.authenticator.authenticatorbase.invoke(authenticatorbase.java:472) @ org.apache.catalina.core.standardhostvalve.invoke(standardhostvalve.java:171) @ org.apache.catalina.valves.errorreportvalve.invoke(errorreportvalve.java:99) @ org.apache.catalina.valves.accesslogvalve.invoke(accesslogvalve.java:947) @ org.apache.catalina.core.standardenginevalve.invoke(standardenginevalve.java:118) @ org.apache.catalina.connector.coyoteadapter.service(coyoteadapter.java:408) @ org.apache.coyote.http11.abstracthttp11processor.process(abstracthttp11processor.java:1009) @ org.apache.coyote.abstractprotocol$abstractconnectionhandler.process(abstractprotocol.java:589) @ org.apache.tomcat.util.net.jioendpoint$socketprocessor.run(jioendpoint.java:310) @ java.util.concurrent.threadpoolexecutor$worker.runtask(threadpoolexecutor.java:886) @ java.util.concurrent.threadpoolexecutor$worker.run(threadpoolexecutor.java:908) @ java.lang.thread.run(thread.java:662)
in common html input tag way works:
<input path="date" type="date" value ="<fmt:formatdate value="${existedevent.date}" pattern="yyyy-mm-dd"/>" />
i want rewrite code using spring tag.
can me fix it?
you need use fmt:formatdate
separately form:input
, reference in value
property alias given in var
property of <fmt:formatdate>
component. example:
<fmt:formatdate value="${existedevent.date}" pattern="yyyy-mm-dd" var="formatteddate"/> <form:input path="date" value ="${formatteddate}" type="date"/>
Comments
Post a Comment