1 Reply Latest reply on Jun 18, 2004 10:49 AM by romaz

    JSP and taglibs

    romaz Newbie

      Hi,

      I'm developing a J2EE web application using JSP.
      I'm interested in using taglibs for various operations. I'm using JBoss 3.2.4.
      I just made a test using google-taglib (google-taglib.sf.net). I followed the instructions: placed taglib jar in /WEB-INF/lib and the .tld in /WEB-INF. Then I changed web.xml adding a taglib entry that points to the .tld.

      I made a pretty simple page to check if all is fine:

      <%@ taglib uri="/google-taglib" prefix="google" %>
      <html>
      <head>
      <title>
       Test Page
      </title>
      </head>
      <body>
      <center><em>Copyright © 2004 by Romaz</em></center>
      </body>
      </html>


      When I try to access my page http://localhost:8080/test/test.jsp I have this error:
      exception

      javax.servlet.ServletException: javax.servlet.jsp.tagext.TagAttributeInfo.(Ljava/lang/String;ZLjava/lang/String;ZZ)V
      org.apache.jasper.servlet.JspServlet.service(JspServlet.java:244)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:853)

      root cause

      java.lang.NoSuchMethodError: javax.servlet.jsp.tagext.TagAttributeInfo.(Ljava/lang/String;ZLjava/lang/String;ZZ)V
      org.apache.jasper.compiler.TagLibraryInfoImpl.createAttribute(TagLibraryInfoImpl.java:568)
      org.apache.jasper.compiler.TagLibraryInfoImpl.createTagInfo(TagLibraryInfoImpl.java:401)
      org.apache.jasper.compiler.TagLibraryInfoImpl.parseTLD(TagLibraryInfoImpl.java:248)
      org.apache.jasper.compiler.TagLibraryInfoImpl.(TagLibraryInfoImpl.java:162)
      org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:418)
      org.apache.jasper.compiler.Parser.parseDirective(Parser.java:483)
      org.apache.jasper.compiler.Parser.parseElements(Parser.java:1539)
      org.apache.jasper.compiler.Parser.parse(Parser.java:126)
      org.apache.jasper.compiler.ParserController.doParse(ParserController.java:220)
      org.apache.jasper.compiler.ParserController.parse(ParserController.java:101)
      org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:203)
      org.apache.jasper.compiler.Compiler.compile(Compiler.java:470)
      org.apache.jasper.compiler.Compiler.compile(Compiler.java:451)
      org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)
      org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:511)
      org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:295)
      org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
      org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:853)

      I've tried also some other taglib following the usual steps to get them working. I've always this error!

      Thanks for answers, Romaz

        • 1. Re: JSP and taglibs
          romaz Newbie

          Resolved:

          I was using an erroneus version of javax.servlet.jar (the one I found on JBoss 3.2.3) because I didn't found it in JBoss 3.2.4. Only now I found that the new libraries were in servlet-api.jar and jsp-api.jar.

          Thanks anyway