About Question enthuware.jwpv6.2.930 :

Moderator: admin

Post Reply
gurpreet_asrgndu
Posts: 55
Joined: Thu Jan 03, 2013 7:51 am
Contact:

About Question enthuware.jwpv6.2.930 :

Post 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 ?

admin
Site Admin
Posts: 10384
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

Re: About Question enthuware.jwpv6.2.930 :

Post 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.

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests