Announcement Announcement Module
No announcement yet.
Problem with taglib Page Title Module
Move Remove Collapse
Conversation Detail Module
  • 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>
    at org.apache.jasper.servlet.JspServlet.service(JspSe
    at javax.servlet.http.HttpServlet.service(HttpServlet .java:853)
    at ternalDoFilter(Appl
    at Filter(ApplicationF
    at org.apache.catalina.core.ApplicationDispatcher.inv oke(ApplicationDisp
    at cessRequest(Applica
    at org.apache.catalina.core.ApplicationDispatcher.doF orward(ApplicationD
    at org.apache.catalina.core.ApplicationDispatcher.for ward(ApplicationDis
    at org.springframework.web.servlet.view.InternalResou rceView.renderMerge
    at org.springframework.web.servlet.view.AbstractView. render(AbstractView

    Here is my front.jsp and taglibs.jsp:

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

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

    <%@ taglib prefix="c" uri="" %>
    <%@ taglib prefix="fmt" uri="" %>

    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)



    • #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.