【发布时间】:2014-08-30 11:17:52
【问题描述】:
我采用了一个在 tomcat 中部署的阔叶应用程序,但是在运行页面时,根据 TLD,我发现属性类对于标记形式无效。虽然当我在码头部署应用程序时它工作正常。此外,当我部署应用程序时,我收到警告-
信息:TLD 已跳过。 URI:http://www.springframework.org/tags/form 是 已经定义 信息:TLD 已跳过。 URI:http://www.springframework.org/tags 已经是 定义
在运行定义标签库的 jsp 页面时,我遇到了错误-
org.apache.jasper.JasperException: /WEB-INF/jsp/catalog/product.jsp (第 632 行,第 11 列)根据标签形式,属性类无效 到 TLD 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:237) org.apache.jasper.compiler.Validator$ValidateVisitor.checkXmlAttributes(Validator.java:1265) org.apache.jasper.compiler.Validator$ValidateVisitor.visit(Validator.java:875) org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1539) org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2376) org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2428) org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2434) org.apache.jasper.compiler.Node$Root.accept(Node.java:475) org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2376) org.apache.jasper.compiler.Validator.validateExDirectives(Validator.java:1795) org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:217) org.apache.jasper.compiler.Compiler.compile(Compiler.java:373)
JSP 表单标记行看起来像-
<form:form id="formAddToCart" class="standAloneForm" method="post" action="${pageContext.request.contextPath}/cart/add" modelAttribute="addToCartItem">
<form:input path="productId" type="hidden" value="${product.id}"/>
<form:input path="skuId" type="hidden" value="skuId" id="skuID"/>
<form:input path="quantity" type="hidden" value="1"/>
<input id="addToCart" type="submit" class="genericButton wishAdd inputButtonCss" value="ADD TO CART" onclick="cartItemsScribe('${currentProduct.identifier}');" style="margin-bottom: 4px;padding-top: 6px;font-size: 15px;opacity:0.2" disabled="disabled"/>
<span><a id="addToWish" href="#" class="genericButton wishAdd inputButtonCss" style="color: white;text-decoration: none;text-align: center;background: black;font-size: 11px;padding-top:2px;width: 102px;">ADD TO WISHLIST</a></span>
</form:form>
【问题讨论】:
标签: java spring jsp tomcat7 broadleaf-commerce