Y0gesh Gupta
Y0gesh Gupta

Reputation: 2204

Attribute class invalid for tag form according to TLD

I have taken a broad leaf application which I am deploying in tomcat but while running a page I am getting the attribute class invalid for tag form according to TLD. Though when I am deploying the application in jetty its working fine. Also when I am deploying the application I am getting the warning that-

INFO: TLD skipped. URI: http://www.springframework.org/tags/form is already defined INFO: TLD skipped. URI: http://www.springframework.org/tags is already defined

While running the jsp page where the tag libs are defined I am getting the error-

org.apache.jasper.JasperException: /WEB-INF/jsp/catalog/product.jsp (line: 632, column: 11) Attribute class invalid for tag form according to 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 tag line looks like-

<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>

Upvotes: 0

Views: 5435

Answers (1)

axtavt
axtavt

Reputation: 242786

Not sure why it works in Jetty, but it should be cssClass according to documentation.

Upvotes: 0

Related Questions