• 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
  • Tim Cooke
  • Devaka Cooray
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Martijn Verburg
  • Frits Walraven
  • Himai Minh

question about custom tag

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,I have a question for Tag File:
From HFJ books P498,I knew for a cutom tag,the <body-content>element is default is scriptless.But when I did one mock exam, get the answer
is:The <body-content>empty|JSP|tagdependent</body-content> subelement of <tag> element defines what kind of body should this tag have. If it is not present, then "JSP" is assumed, implying, any valid jsp code is valid as a body of this tag.
If the tag provider wants to make sure that the body of tag should remain empty in the jsp file, then the <body-content> element of <tag> element should have a value of "empty". E.g.

<tag>
<name>Hello</name>
<tag-class>com.abc.HelloTag</tag-class>
<body-content>empty</body-content>
</tag>

This makes sure that the tag is NOT accidently passed a body ie.:
<mytaglib:Hello>anything here, even a space, is invalid</mytaglib:Hello>
Is it means <body-content> definition in *.tld file and tag file is different?
TKS for answer ASAP!
David
 
David Hu
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,I just checked spec,I found whatever in tld file or tag file, there isn't "JSP" param for <body-content>,just use none/empty/scriptless.Is it right?Pls help me.
 
You totally ruined the moon. You're gonna hafta pay for that you know. This tiny ad agrees:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic