• 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
  • Ron McLeod
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Rob Spoor
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Carey Brown
Bartenders:

custom tags must have a TLD?

 
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi friends
I have a dought regarding custom tags(which is used to invoke Tag File)and its TLD.
HFSJ book page 500-says that "custom tags must have a TLD ,but Tag Files can declare attributes and body-content directly inside the Tag File,and need Tlds only if the Tag File is in a JAR."
my dought is:if my custom tag is trying to invoke Tag File ,then what to configuer in <name> and <tag-class> subelements of <tag> in TLD?
If anybody knows the answer please let me know.


Thanks in advance
 
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Custom tags don't invoke tag files.
Tag files are the *special case* of tags that don't need a tag class.
Tag files are an easy way for your non-java-programming team to include
EL-processed jsp fragment files, like headers or footers.

Custom tags, alternatively, require a java class extended by one of the Tag Support classes, and thus require a nice meaty section in your TLD file.

DaveS
SCJP
 
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Dave,

I think Nagalatha is trying to say that if a tag file is in a JAR inside the lib folder, then according to the specs, it MUST have a tld file associated with it.

So in this case how to configure the tld for the tag file?(Even I had the same question in mind...)

Nagalatha, please let me know if I interpreted your question properly or not...
 
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi folks,

If the question must be interpreted as "How to configure Tag files in TLD, when placed inside JAR?", then I think following would be the answer.

Use <tag-file> element in your tld to configure.

 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic