Help coderanch get a
new server
by contributing to the fundraiser
  • 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
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

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.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic