About <taglib> element in the web.xml doubt ?
Posted: Thu Jan 03, 2013 8:52 am
Consider i have a tld file hello.tld with a uri tag in it as <uri>guru</uri>. i put this .tld file in WEB-INF directory. also i put a taglib element in web.xml as follows :
<taglib>
<taglib-uri> test </taglib-uri>
<taglib-location>/WEB-INF/hello.tld</taglib-location>
</taglib>
my question is which mapping will container choose : test -----> /WEB-INF/hello.tld OR
guru---->/WEB-INF/hello.tld OR both will be loaded.
question no. enthuware.jwpv6.2.1053 explanation says that :
Note that the mapping information contained within the tld file will always be loaded by the container. The <taglib> tag in web.xml is used to provide any additional taglib-uri mappings. And for those additional mappings, you will need to specify the taglib-location.
<taglib>
<taglib-uri> test </taglib-uri>
<taglib-location>/WEB-INF/hello.tld</taglib-location>
</taglib>
my question is which mapping will container choose : test -----> /WEB-INF/hello.tld OR
guru---->/WEB-INF/hello.tld OR both will be loaded.
question no. enthuware.jwpv6.2.1053 explanation says that :
Note that the mapping information contained within the tld file will always be loaded by the container. The <taglib> tag in web.xml is used to provide any additional taglib-uri mappings. And for those additional mappings, you will need to specify the taglib-location.