Announcement Announcement Module
Collapse
No announcement yet.
use spring taglib error! Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • use spring taglib error!

    Hi

    1.copy spring.tld to web-inf/lib
    2.in web.xml:
    <taglib>
    <taglib-uri>/spring</taglib-uri>
    <taglib-location>/WEB-INF/lib/spring.tld</taglib-location>
    </taglib>
    3.in jsp page:
    <%@ taglib prefix="spring" uri="/spring" %>
    ...
    <spring:bind path="command.*">


    error:
    org.apache.jasper.JasperException: Unable to compile class for JSP

    An error occurred at line: 12 in the jsp file: /WEB-INF/view/register.jsp

    Generated servlet error:
    [javac] Compiling 1 source file

    D:\jboss\server\default\work\jboss.web\localhost\S pringApp\org\apache\jsp\WEB_002dINF\view\register_ jsp.java:90: _jspx_meth_c_forEach_0(javax.servlet.jsp.tagext.Js pTag,javax.servlet.jsp.PageContext,int[]) in org.apache.jsp.WEB_002dINF.view.register_jsp cannot be applied to (org.springframework.web.servlet.tags.BindTag,java x.servlet.jsp.PageContext,int[])
    if (_jspx_meth_c_forEach_0(_jspx_th_spring_bind_0, _jspx_page_context, _jspx_push_body_count_spring_bind_0))
    ^

  • #2
    I had a similiar problem, but I cannot remember exactly how I fixed it

    I think it has something to do with different version of jstl, and the taglib standard.jar being on your classpath.

    I *think* I also got something similiar when I was using jsp2 and deployed on tomcat 4.

    Comment

    Working...
    X