You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Steve Buroff <sj...@lucent.com> on 2000/09/06 19:27:22 UTC

Re: taglib - found

Thanks to all for your help. I found the problem. It is tomcat.
I was using 3.1. I upgraded to 3.2 and now it all works fine.
That will teach me to keep up with the latest release.

Steve
  ----- Original Message ----- 
  From: Kevin Jones 
  To: tomcat-user@jakarta.apache.org 
  Sent: Wednesday, September 06, 2000 12:52 PM
  Subject: RE: taglib - please help.


  > My reading of the JSP 1.1 API is that a <taglib> entry in web.xml
  > is required for the JSP engine to interpret taglib entries.

  No, you have three options, in <%@ taglib ...>

  The uri could be "/somejar.jar" in which case the jar file needs a META-INF
  directory the contains taglib.tld.

  The uri could be "/sometld.tld" where the sometld.tld file is in a directory
  relative to your context.

  The uri could be "sometld" in which case you need an entry in the web.xml
  file that maps the tld "name" (sometld) to a tld file.

  Which version of Tomcat are you using, I've just tried your jsp and tld file
  on my machine and it works fine - of course it doesn't find the class, but
  the tld is parsed OK,

  Kevin Jones
  DevelopMentor
  www.develop.com

  > -----Original Message-----
  > From: William Brogden [mailto:wbrogden@bga.com]
  > Sent: 06 September 2000 16:18
  > To: tomcat-user@jakarta.apache.org
  > Subject: Re: taglib - please help.
  >
  >
  >
  > Thanks for the suggestion. However, I didn't use a taglib
  > declaration in web.xml. I
  > used the real URL in the .jsp file. The file psip.tld
  > is in my context directory and in the WEB-INF
  > subdirectory.
  >
  > Steve
  >
  >
  >      ----- Original Message -----
  >      From: William Brogden
  >      To: tomcat-user@jakarta.apache.org
  >      Sent: Wednesday, September 06, 2000 10:32 AM
  >      Subject: Re: taglib - please help.
  >
  >
  >
  >      > Steve Buroff wrote:
  >      >
  >      > I'm trying to get a tag library to work and I need a little
  > help.
  >      > I'm getting the error:
  >      >
  >      >
  >      >      org.apache.jasper.JasperException:
  >      >      Unable to open taglibrary /psip.tld : Parse Error in the
  >      >      tag library descriptor:
  >      >      Element "web-app" does not allow "servlet" here.
  >      >
  >      > This makes no sense to me. There is no string "web-app" and no
  >      > string "servlet" in
  >      > my psip.tld file. I've attached both psip.tld and the .jsp file
  > I'm
  >      > using to test it.
  >      > My two classes simply extend TagSupport and BodyTagSupport and
  > don't
  >      > override
  >      > any methods so I don't think they can be the problem.
  >
  >      Probably Tomcat is not even getting to your tlds. I bet the
  > problem is
  >      in a web.xml file somewhere.  Check your taglib declaration.
  >
  >      --
  >      WBB - wbrogden@bga.com  Chief Scientist, LANWrights, Inc.
  >      Java Programmer Certification information and mock exam
  >      at  http://www.lanw.com/java/javacert/