我一直在尝试将我现有的Spring MVC项目迁移到Springboot一切顺利,除了 org.apache.jasper.JasperException 异常之前一些jsp工作正常 这是代码和异常
<form:input cssClass="form-control" id="serviceURL"
path="serviceURL" maxlength="250" value='${serviceProviderData.serviceURL}'
oninput="this.value=this.value.toLowerCase();"
onblur="this.value=this.value.trim();return validateserviceURL();"
onclick="clearErrorMsg('serviceURLErrDiv');" />
为此我根据TLD 确定标签[输入]的属性[值]无效 这是我在jsp中包含的标签
<%@taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
异常日志
2017-11-07 14:49:24.941 ERROR 6911 --- [nio-8092-exec-7] o.a.c.c.C.[.[.[.[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [/web] threw exception [/WEB-INF/pages/service.jsp (line: [168], column: [13]) Attribute [value] invalid for tag [input] according to TLD] with root cause
org.apache.jasper.JasperException: /WEB-INF/pages/service.jsp (line: [168], column: [13]) Attribute [value] invalid for tag [input] according to TLD
jsp渲染的依赖
<dependency>
<groupId>org.apache.tomcat.embed</groupId>
<artifactId>tomcat-embed-jasper</artifactId>
<!-- <scope>provided</scope> -->
</dependency>
我不知道我在哪里做错了,因为早期使用Spring MVC 相同的jsp
提前致谢
答案 0 :(得分:0)
oninput
标记没有form:input
之类的属性。请参阅有效表单的完整列表:输入属性here
答案 1 :(得分:0)
根据春天FORM TLD documentation,没有输入定义
I think you was using <form input=".." > as part of html not <form:input > as taglib.
答案 2 :(得分:0)
经过2天的努力,我通过从WEB-INF位置删除.tld文件解决了这个问题,之后一切都开始工作了