The web.xml file is the deployment descriptor and it contains configuration
information about the web application.

I'm not entirely clear on what the question is but I can give some helpful
hints. Make sure that the web.xml file is in the <webapp>/WEB-INF directory.
Also make sure that you have the following snippet in your web.xml:

----
<taglib>
<taglib-uri>"taglib-uri-goes-here"</taglib-uri>
<taglib-location>/WEB-INF/"tld-name-goes-here".tld</taglib-location>
</taglib>
----

In this instance, make sure that your tld is present in the /WEB-INF
directory.

The web.xml map allows very explicit description of the tag libraries that
are being used in a web application. You can also have a taglib directive
refer directly to the TLD.

Justy

----- Original Message -----
> hey guys
>
> i've removed meta-inf directory and web.xml file and referred tld file
> directl y.. now it's working properly... but wht's the use of web.xml file
> for a web app? i think it is supposed to map the uri attribute specified
in
> the taglib directive to its respective tld file right? but what's going on
> with my code...
> as one of friend elicited, i corrected those things and now i'm getting a
> different type of error msg saying that
>
> C:\Jakarta\jakarta-tomcat-3.2.1\webapps\gen\test.jsp(0,0) Unable to open
> taglibrary FirstTag : C:\Jakarta\jakarta-tomcat-3.2.1\webapps\gen\FirstTag
> (The system cannot find the file specified)
>
> that is it's trying to open  a tld file by FirstTag in the .../gen
> direcotry
> as it is hte context path!!! i'm not able to understand the use of the
> web.xml file then ? why isn't mapping this uri "FirstTag" to
> "/Web-Inf/GenTag.tld" as i specified it in the  <taglib-uri> and
> <tablib-location> elements of the web.xml file !!!
>
> please bear my nonsense(if it is so!) and clarify my doubt.... there's
> something basic bridging point i'm missing i suppose!
>
> thanx in advance
>
> regds
> kasu
>
>
> -----Original Message-----
> From: A mailing list about Java Server Pages specification and reference
> [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, May 17, 2001 4:28 PM
> To: [EMAIL PROTECTED]
> Subject: Re: plz help me out ....
>
>
>
>
> Couple of things:
> a) There is no tag defined by the name of gen, there is one with the name
> of
> FirstTag check your .tld file.
> In your jsp change the call from gen to FirstTag.
> b) Just double check to see that the header ( the first couple of lines)
of
> your .tld file are correct.
> After doing the above the code is working fine on an windows 98 machine
> running tomcat 4.0 / jdk 1.3.
> Have a nice day.
> With regards,
> Sachin S. Khanna
> http://www.emailanorder.com
> ----- Original Message -----
> From: K.S.SREEDHAR KUMAR <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Thursday, May 17, 2001 11:21 AM
> Subject: plz help me out ....
>
>
> > hey buddies
> >
> > i'm a newbie to the JSP arena.... i've just come to custom tag
> > development.... i'm getting mad in deploying a sample app.... btw i'm
> using
> > tomcat 3.2.1 server...
> >
> > is there any strict naming convention for the tld file if so plz specity
> > it....
> >
> > i'm providing u source for web.xml, tld file ,tag handler(.java) and jsp
> > file with this..
> >
> > the directory structure which i'm having now is as follows:
> >
> >
> > sample web application context path is : /gen
> >
> > tld file is in : /gen/Meta-Inf/GenTag.tld
> > web.xml file is in : /gen/Web-Inf/web.xml
> > tag handler class file is in : /gen/Web-Inf/classes/GenTag.class
> > jsp file is in : /gen/test.jsp
> >
> >
> > btw context path adddr is : <server-root>/webapps/gen
> >
> > hte error which i'm getting is::
> > org.apache.jasper.compiler.CompileException:
> > C:\Jakarta\jakarta-tomcat-3.2.1\webapps\gen\test.jsp(0,0) Unable to open
> > taglibrary FirstTag : C:
> \Jakarta\jakarta-tomcat-3.2.1\webapps\gen\FirstTag
> > (The system cannot find the file specified)
> >
> >
> > all i want is this sample app should work... what ever u say i'm ready
to
> > accept!!!!
> >
> >
> > TEST.JSP::
> >
> > <%@ taglib uri="FirstTag" prefix="test" %>
> > <html>
> > <body>
> >
> > custom action result is
> > <test:gen>
> > false
> > </test:gen>
> > hahhaha
> > </body></html>
> >
> >
> > WEB.XML ::
> >
> > <?xml version="1.0" encoding="ISO-8859-1"?>
> > <!DOCTYPE web-app    PUBLIC "-//Sun Microsystems, Inc.//DTD Web
> Application
> > 2.2//EN"    "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd";>
> >
> > <web-app>
> > <taglib>
> >
> >      <taglib-uri>
> >           FirstTag
> >      </taglib-uri>
> >
> >      <taglib-location>
> >           /Web-Inf/GenTag.tld
> >      </taglib-location>
> >
> > </taglib>
> > </web-app>
> >
> >
> >
> > GenTag.tld ::
> >
> > <?xml version = "1.0" encoding = "ISO-8859-1" ?>
> > <!DOCTYPE taglib
> >   PUBLIC "-//Sun Microsystems, Inc.//DTD JSP TagLibrary 1.1 file://EN"
> >        "http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd";>
> >  <taglib>
> >       <tlibversion>1.0 </tlibversion>
> >       <jspversion>1.1</jspversion>
> >       <shortname>FirstTag</shortname>
> >
> >       <tag>
> >           <name>FirstTag</name>
> >           <tagclass>GenTag</tagclass>
> >       </tag>
> >  </taglib>
> >
> >
> >
> > GenTag.java:: (TAG HANDLER)
> >
> > import java.io.*;
> > import javax.servlet.jsp.tagext.*;
> > import javax.servlet.jsp.*;
> >
> > public class GenTag extends BodyTagSupport{
> >
> >      public int doStartTag() {
> >           try {
> >                JspWriter out = pageContext.getOut();
> >                out.print("Custom tag example " +
> >                               "(coreservlets.tags.ExampleTag)");
> >           } catch(IOException ioe) {
> >                System.out.println("Error in ExampleTag: " + ioe);
> >           }
> >           return(SKIP_BODY);
> >      }
> > }
> >
> > thanx in advance
> >
> > regards
> > ks
> >
> >
>
===========================================================================
> > 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://java.sun.com/products/jsp/faq.html
> >  http://www.esperanto.org.nz/jsp/jspfaq.html
> >  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
> >  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
> >
>
>
===========================================================================
> 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://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
>
>
===========================================================================
> 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://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
>

===========================================================================
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://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to