• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

about taglib-uri

 
Win Yu
Ranch Hand
Posts: 224
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am not sure how to specify value for "taglib-uri". Is it just a name. Please expalin. Thanks
 
ruijin yang
Ranch Hand
Posts: 96
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Win,
According to JSP 1.2 Specification:
<!ELEMENT taglib ( taglib-uri, taglib-location ) >
<taglib-uri>
A taglib-uri element describes a URI identifying a tag library used in the web application.
EX:<taglib>
<taglib-uri>/hello</taglib-uri>
<taglib-location>/WEB-INF/tlds/hello.tld</taglib-location>
</taglib>
In JSP file,<%@ taglib uri="/hello" prefix="prefix"%>
ruijin yang
Originally posted by Win Yu:
I am not sure how to specify value for "taglib-uri". Is it just a name. Please expalin. Thanks


[This message has been edited by ruijin yang (edited November 16, 2001).]
 
ather ali
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Win Yu:
I am not sure how to specify value for "taglib-uri". Is it just a name. Please expalin. Thanks

the <taglib-uri> element describes a URI relative to the location of web.xml
while <taglib-location> element contains the location of the Tag Library Descriptor file i.e .tld file (as a resource relative to the root of the web application )

------------------
SCJP2
 
Win Yu
Ranch Hand
Posts: 224
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by ather ali:
the <taglib-uri> element describes a URI relative to the location of web.xml
while <taglib-location> element contains the location of the Tag Library Descriptor file i.e .tld file (as a resource relative to the root of the web application )

Hi ather :
From the example that Mr.Yang posted before yours, the tlbtag-uri should be "/tlds/hello" not "/hello". I think both should works. Correct me if I am wrong.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic