Announcement Announcement Module
Collapse
No announcement yet.
Problem with taglib Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Problem with taglib

    I have a problem with including taglibs into my jsp page (front.jsp). Tomcat throws the following exception:

    INFO - AbstractCachingViewResolver.resolveViewName(81) | Cached view 'front'
    ERROR - FrameworkServlet.service(342) | Could not complete request
    javax.servlet.ServletException: javax.servlet.jsp.tagext.TagAttributeInfo.<init>
    (Ljava/lang/String;ZLjava/lang/String;ZZ)V
    at org.apache.jasper.servlet.JspServlet.service(JspSe rvlet.java:244)
    at javax.servlet.http.HttpServlet.service(HttpServlet .java:853)
    at org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(Appl
    icationFilterChain.java:237)
    at org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationF
    ilterChain.java:157)
    at org.apache.catalina.core.ApplicationDispatcher.inv oke(ApplicationDisp
    atcher.java:704)
    at org.apache.catalina.core.ApplicationDispatcher.pro cessRequest(Applica
    tionDispatcher.java:474)
    at org.apache.catalina.core.ApplicationDispatcher.doF orward(ApplicationD
    ispatcher.java:409)
    at org.apache.catalina.core.ApplicationDispatcher.for ward(ApplicationDis
    patcher.java:312)
    at org.springframework.web.servlet.view.InternalResou rceView.renderMerge
    dOutputModel(InternalResourceView.java:91)
    at org.springframework.web.servlet.view.AbstractView. render(AbstractView
    .java:241)


    Here is my front.jsp and taglibs.jsp:

    <front.jsp>
    <%@ include file="common/taglibs.jsp" %>

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>
    <title>My Exercise</title>
    <link rel="stylesheet" href="style.css">
    </head>
    <body>
    <h1> Test</h1>
    </body>
    </html>

    <taglibs.jsp>
    <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
    <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>


    Everything works fine if I'm not going to include those taglibs, but I don't know what causes this exception.

    - twest

  • #2
    I think this is a more general question about JSTL and tags, maybe you should consult the Jakarta TagLibs mailing list...

    One thing that might help: do you have the standard.jar and jstl.jar on your classpath (and the correct versions, you're using the JSTL 1.1 uris-- they include /jsp/jstl/core instead of jstl/core--so you should have the 1.1 jars in there)

    regards,
    Alef

    Comment


    • #3
      Finally solved this. This was a problem with the classpath and using the correct jar for Tomcat 5, somehow a servlet.jar was used and the correct jar file (servlet-api.jar for Tomcat 5.x.x) was ignored although it was also in my classpath.

      Comment

      Working...
      X