Hi,
I tried these options,
1. Put .jar file in /WEB-INF/lib and tld file in /WEB-INF/tlds directory and tried to
with tag lib as
<%@ taglib uri=\"/WEB-INF/lib/upload.jar\" prefix=\"up\" %>
and
<%@ taglib uri=\"/WEB-INF/tlds/taglib.tld\" prefix=\"up\" %>
in both the cases, it didnot worked.
2. I changed web.xml file to add location and uri as,
<taglib>
<taglib-uri>/taglib
</taglib-uri>
<taglib-location>
/WEB-INF/tlds/taglib.tld
</taglib-location>
</taglib>
and used tag lib as,
<%@ taglib uri=\"/taglib\" prefix=\"up\" %>
Here I tried both .tld as well as .jar in location tag. In both the cases it gave the
following error..
2002-02-25 11:58:58 - Ctx( /skillset ): JasperException: R( /skillset +
/jsp/checkinResume.jsp + nul
l) E:\\jakarta-tomcat-3.2.3\\webapps\\skillset\\jsp\\checkinResume.jsp(1,0) Unable to
open taglibrary /ta
glib : E:\\jakarta-tomcat-3.2.3\\webapps\\skillset\\WEB-INF\\web.xml (The system
cannot find the file spe
cified)
So, I tried to put the web.xml file in /skillset/WEB-INF directory, in that case,
tomcat didnot started at all. I am not understanding where I am making mistake? Any
more inputs ??
Thanks in advance
Smita Kotnis.
Hans Bergsten <[EMAIL PROTECTED]>:
> Smita Kotnis wrote:
>
> > Hi All,
> > I need to use a taglib developed by third party in my JSPs.
>
> > I have one .jar and a .tld file with me. Where to put these files so
> > that my tomcat 3.2 understands it? I tried following options,
>
> > 1. Made a directory as tld under WEB-INF and tried to call it in my
>
> > JSP as,
>
> >
> > <@@ tag lib uri=/WEB-INF/mytaglib.tld prefix=\\\"test\\\" %>
> > (As described in a book by Hans )
> >
> > 2. Put that tld in some directory and gave class path pointing to
>
> > that file.
>
> >
> > Both of these ways failed. I am still getting the error that tag lib
>
> > not found !!
>
> > What is the exact way to use tag libs? Where to put these files?
> Thanks
>
> > in advance.
>
>
> The JAR file always go in the WEB-INF/lib directory for the
> application.
>
> You can identify the TLD file in two ways in the taglib directive:
> 1) By using a file path as the \"uri\" attribute value. For example,
> if the TLD file is stored in /WEB-INF/tlds/mylibrary.tld, use
> <%@ taglib uri=\"/WEB-INF/tlds/mylibrary.tld\" prefix=\"xxx\" %>
> It sounds like you didn\'t use the correct path when you tried this
> alternative.
>
> 2) By using a symbolic name as the \"uri\" attribute value, and map the
> symbolic name to a file path in the web.xml file for the
> application.
> For instance, with the TLD in the same location as before, you
> can use <%@ uri=\"/mylibrary\" prefix=\"xxx\" %> if you also put this
> in the web.xml file:
>
> <web-app>
> ...
> <taglib>
> <taglib-uri>/mylibrary</taglib-uri>
>
> <taglib-location>/WEB-INF/tlds/mylibrary.tld</taglib-location>
> </taglib>
> ...
> </web-inf>
>
> In both cases, the file path can be to the JAR file instead of to a
> separate TLD file, if the TLD is included in the JAR file as
> \"META-INF/taglib.tld\".
>
> All of this is described in my JSP book in Chapter 8, the Using
> Custom Actions section, and in more detail in Chapter 16, the
> Packaging and Installing a Tag Library section.
>
> Hans
> --
> Hans Bergsten [EMAIL PROTECTED]
> Gefion Software http://www.gefionsoftware.com
> JavaServer Pages http://TheJSPBook.com
>
> ===========================================================================
> To unsubscribe: mailto [EMAIL PROTECTED] with body: \"signoff
> JSP-INTEREST\".
> For digest: mailto [EMAIL PROTECTED] with body: \"set JSP-INTEREST
> DIGEST\".
> Some relevant FAQs on JSP/Servlets can be found at:
>
> http://archives.java.sun.com/jsp-interest.html
> http://java.sun.com/products/jsp/faq.html
> http://www.esperanto.org.nz/jsp/jspfaq.jsp
> http://www.jguru.com/faq/index.jsp
> http://www.jspinsider.com
>
-------------------------------------------------
This mail helped a tree grow. Know more at http://green.sify.com
Take the shortest route to success!
Click here to know how http://education.sify.com
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:
http://archives.java.sun.com/jsp-interest.html
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.jsp
http://www.jguru.com/faq/index.jsp
http://www.jspinsider.com