tld files cannot be in any location. With JSP 2.0, the container automatically checks for tld files inside /WEB-INF or any sub directories inside WEB-INF folder. If its going to be in a jar, it has to be inside /META-INF (/subdirectories). But with JSP versions below 2.0, we have to give an entry for the tld files in the web.xml file as follows:
The taglib location should always start with /WEB-INF or /META-INF in case the tld is to be inside a jar [ August 04, 2008: Message edited by: Hema Nandhini ]
Thanks for your reply. If the container is going to directly look for tld files under WEB-INF then why do we need the location to start with /WEB-INF instead we can start with /hello.tld in my example, so that the container directly looks for hello.tld under WEB-INF directory.
According to your case if we give the location as /WEB-INF/myTag.tld then the container will look for a directory WEB-INF under WEB-INF (which doesnt exist) since the container directly checks under WEB-INF directory for tld files.