When to specify taglib uri in web.xml

When declaring a URI in the taglib directive, when must you include the taglib elements in web.xml, and when can you avoid them?

I tried putting a relative path to the .tld file, setting uri to ?WEB-INF/mysubfolder/myfile.tld? but my web server complains that I抦 missing a tlib-version element somewhere?br>

What is the uri path relative to, and in what cases must you include a mapping in web.xml and when do you not have to?

Thanks.

[459 byte] By [lightbulb4321a] at [2007-11-27 5:08:39]
# 1
tlib version is a tab in myfile.tld filecheck whether you have written that tagif you have not written write it as below<tlib-version>1.1</tlib-version>i'm sure it works
santhoshreddythuragaa at 2007-7-12 10:28:10 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2

So it sounds like your tld file has some invalid xml in it.

Double check the contents of your tld file.

If you declare a <uri> in your taglibrary, then you never need to declare it in web.xml.

You can just use that "well-known" uri to access your tag library.

The tld has to be either

1 - in the META-INF folder of a jar file deployed

2 - under the WEB-INF directory

See JSP specification section JSP.7.3.1

evnafetsa at 2007-7-12 10:28:10 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...