Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

body-content for tag files, classic and simple tags

 
Ranch Hand
Posts: 1277
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
for tag files the following values are valid as <body-content>

empty
tagdependent
scriptless (default)

tag files cannot use scripting, but the tags, that invloke the tag files, can have scripting in their bodies.


for classic tags, the following values are valid as <body-content>

empty
tagdependent
scriptless
JSP

whats the defualt ???

for simple tags, the following values are valid as <body-content>


empty
tagdependent
scriptless

in jsp1.2, JSP was the default value for <body-content>, but the 2.0 spec has dropped JSP as body-content completely. so whats the default value ??? nothing...! for simple tags, you must specify the body-content, else you get a error ( any one confirm this )
 
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
..I think there is no speicific default body-content for custom tags. It just depends on how you specify the <body-content> element in TLD.
For custom tag(simple tag, custom tag), the <body-content> is required, (mandatory) in TLD.

For tag file, it has a default value of 'body-content' which is 'scriptless'. The tag file 'body-content'is not defined in TLD, rather, it's defined inside the tag file itself using <%@ tag > directive, for example, <%@tag body-content="tagdepent" %>.

For a custom tag, the <body-content> element inside the TLD is mandatory, but a Tag File doesn't have to declare <body-content> if the default (scriptless) is acceptable. As with Simple tags, the Tag File body cannot be scripting either as you mentioned.
 
Niranjan Deshpande
Ranch Hand
Posts: 1277
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
some confirmations ?
 
Trust God, but always tether your camel... to this tiny ad.
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic