tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Maya Muchnik <mmuch...@pumatech.com>
Subject Re: unable to open tablibrary
Date Thu, 18 Jan 2001 21:06:41 GMT
Try to put the TLD file under WEB-INF dir directly, not under taglib. And
change its location in web.xml after that.

"Yang,Chun" wrote:

> The <uri>...</uri> in the tld file is as follows:
>
>   <tlibversion>1.0</tlibversion>
>   <jspversion>1.1</jspversion>
>   <shortname>simple</shortname>
>   <uri>http://www.yangc.com/taglib/testtags</uri>
>
> So it is the same as that that in the web.xml and the jsp file.
>
>  Anyway I believe the uri entry in the tld file doesn't have any bearing on
> that in the in web.xml as well as in the jsp file, according to the JSP
> spec.
>
> Of course I could have remembered it wrong.
>
> So again what can be the problem ?
>
> > -----Original Message-----
> > From: Maya Muchnik [SMTP:mmuchnik@pumatech.com]
> > Sent: Thursday, January 18, 2001 3:24 PM
> > To:   taglibs-user@jakarta.apache.org
> > Cc:   Yang,Chun
> > Subject:      Re: unable to open tablibrary
> >
> > Check your TLD file for <uri> ... </uri> content. Something similar
what
> > you
> > have in JSP file must be there.
> >
> > "Yang,Chun" wrote:
> >
> > > The class file for the tag is in WEB-INF/classes as I didn't packaged it
> > in
> > > a jar file...
> > >
> > > So what can be the problem ?! Is there possibly a bug with Tomcat
> > handling
> > > taglib tld location ?
> > >
> > > > -----Original Message-----
> > > > From: Marius Scurtescu [SMTP:marius@multiactive.com]
> > > > Sent: Thursday, January 18, 2001 2:17 PM
> > > > To:   taglibs-user@jakarta.apache.org
> > > > Cc:   Yang,Chun
> > > > Subject:      Re: unable to open tablibrary
> > > >
> > > > In general you should put the tld into "WEB-INF/tlds", but your
> > > > configuration looks OK since you properly reference the location
> > > > where you put it (WEB-INF/taglib).
> > > >
> > > > Make sure that the implementation of the tag library (the jar file)
> > > > goes to WEB-INF/lib, you don't have a choice on this one. If you
> > > > don't have a jar file then you have to put the class files
> > > > to WEB-INF/classes.
> > > >
> > > > Marius
> > > >
> > > > Maya Muchnik wrote:
> > > > >
> > > > > I think, your TLD file must to be located under
> > WEB-INF/taglib/testtags
> > > > > directory, not WEB-INF/taglib directory. Maybe I am wrong.
> > > > >
> > > > > Maya
> > > > >
> > > > > "Yang,Chun" wrote:
> > > > >
> > > > > > Hi, I have encountered the following error message when I try
to
> > run a
> > > > jsp
> > > > > > page with a simple empty bodycontent tag.
> > > > > > The error message reads:
> > > > > > org.apache.jasper.compiler.CompileException:
> > > > > > D:\chun\testarea\taglib\helloworldtag.jsp(0,0) Unable to open
> > > > taglibrary
> > > > > > http://www.yangc.com/taglib/testtags : null
> > > > > > The entries for the afore-mentioned taglib in web.xml is:
> > > > > >     <taglib>
> > > > > >         <taglib-uri>
> > > > > >            http://www.yangc.com/taglib/testtags
> > > > > >         </taglib-uri>
> > > > > >         <taglib-location>
> > > > > >            /WEB-INF/taglib/test-taglib.tld
> > > > > >         </taglib-location>
> > > > > >     </taglib>
> > > > > > And the test-taglib.tld which is located in
> > > > <CONTEXT_ROO>/WEB-INF/taglib has
> > > > > > the following entry:
> > > > > >   <tag>
> > > > > >       <name>hw</name>
> > > > > >       <tagclass>HelloWorldTag</tagclass>
> > > > > >       <bodycontent>empty</bodycontent>
> > > > > >       <info>
> > > > > >       </info>
> > > > > >   </tag>
> > > > > > And the jsp page is as simple as
> > > > > > <%@ taglib uri="http://www.yangc.com/taglib/testtags" prefix="foo"
> > %>
> > > > > > <html>
> > > > > > <body>
> > > > > >
> > > > > > <foo:hw/>
> > > > > >
> > > > > > <hr>
> > > > > >
> > > > > > </body>
> > > > > > </html>
> > > > > >
> > > > > > What could poooossibly be wrong ? I read the documentation several
> > > > times and
> > > > > > simply couldn't figure this out !
> > > > > >
> > > > > > btw, the environment I am working in is Apache1.3.14(win32)
and
> > > > TomCat3.2.1
> > > > > >
> > > > > > Your help is greatly appreciated!
> > > >
> > > > --
> > > > ------------------
> > > > Marius Scurtescu, Software Engineer
> > > > Tel: (604) 899-2835 Fax: (604) 899-2899
> > > > mailto:marius@multiactive.com
> > > > Multiactive Software Inc. http://www.multiactive.com
> > > > ------------------
> > > > Attract and retain customers with Multiactive Software --
> > > > proud winners of PC WEEK's "Best of COMDEX" award.
> > > > ------------------


Mime
View raw message