Page 1 of 1

About Question enthuware.jwpv6.2.930 :

Posted: Thu Jan 03, 2013 8:22 am
by gurpreet_asrgndu
the first part of explanation says :
The taglib directive contains 2 attributes:

uri : This should be the same as <taglib-uri> of <taglib> element in web.xml.
The uri can also be non-absolute (no hostname and port number): uri="/tlds/SmartAcount.tld" In this case, this does not have to occur in the web.xml.

if the uri is non-absolute like /tlds/SmartAcount.tld, then if it does not occur in the web.xml(as the explanation says above) then that means we are not providing taglib element in the web.xml and that container is making map between uri and actual location upon application deployment. this further means that the uri element in the tld must be same as in the taglib directive. i.e. uri="/tlds/SmartAcount.tld should be equal to <uri> </uri> xml tag. am i right ?

or is it like that if i give complete path to my tld in uri attribute of taglib directive then the container picks that path without needing any automatic scanning and without needing any taglib tag in xml ?

Re: About Question enthuware.jwpv6.2.930 :

Posted: Thu Jan 03, 2013 1:53 pm
by admin
If the uri is non-absolute like /tlds/SmartAcount.tld, then if it does not occur in the web.xml(as the explanation says above):
In this case, the container will assume that /tlds/SmartAcount.tld is the correct location for the tld and will look for it in that location i.e. it will look for SmartAccount.tld in /tlds.

You might want to take a look at Section JSP.7.3.6.2 Computing the TLD Resource Path. It explains very nicely.

HTH,
Paul.