• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Location of .tld file

 
Ranch Hand
Posts: 133
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear All,
In head first, i have read that tld files must be inside WEB-INF/ or it's subdirectory. Or it must
be inside META-INF/ or it's subdirectory if it is bundled in jar. But when i move the same tld file
into application context directory and use taglib as follow-
<%@ taglib prefix="dyna" uri="/Test.tld"%>
It works fine.
How come rule to put tld into 'WEB-INF/ or it's subdirectory, META-INF/ or it's subdirectory' is broken and still things are fine.
Thanks
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Because you are being sloppy. The URI should be defined inside the TLD itself and should them be used to match the TLD, not the file path. That's rather fragile.
 
Ranch Hand
Posts: 239
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am wondering why the JSP would still like to employee the Tag file after it has already had the Custom Tag class and EL function.
I am still poor in the Tag file part of the objectives while heading SCWCD.
 
Sharmila Punde
Ranch Hand
Posts: 133
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear Bibeault,
Thanks for your reply.
As per Head First, uri element is optional in '.tld' file. So if uri element is not mentioned in '.tld' file, then
uri attribute of taglib directive can take a path towards '.tld' file. But i was surprise to see it works fine even if '.tld'
file is NOT put into web_application_root/WEB-INF/ and IS PUT into web application root directory.
Thanks Zhixiong
 
These are the worst of times and these are the best of times. And this is the best tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic