• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Default value of body-content

 
tanu dua
Ranch Hand
Posts: 145
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Correct me if I am wrong here, here is my understanding:

1. in TLD, a <body-content> element for a simple tag can be: empty, scriptless and tagdependent. The default is scriptless.

2. in TLD, a <body-content> element for a classic tag can be: empty, scriptless, tagdependent and JSP. The default is?

3. you can have template text, standard and custom actions, EL expressions and include directives as the body of a simple tag, and those will be evaluated or processed before the body of the simple tag is converted into a JspFragment. However, the included content must also be non-scripting.

4. a simple tag can include a classic tag, provided the body of the classic tag is non-scripting.
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
2. Once upon a time, there were only one type of tags, known as classic tags. Their body-content's default value was "JSP". But classic tags were a pain to make, so a new type of tags came to the show. The so-called Simple tags. They are cool, easier to develop, but they don't allow developers to set their body-content to JSP. No no no. They don't want to hear about it.

So what about classic tags ? Poor fellows. Their default body-content, their beloved "JSP", is gone. They can't use it anymore, because the Simple tags would go mad. So what's the default ? Nothing !! It's not even vendor-specific. You have to set the value explicitly, otherwise unpredictable behavious may occur.
 
Yogesh Hingmire
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Satou,
If i have a simple tag handler and i declare the <body-content> as JSP which is wrong, will this result in a translation time or request time error ?

Also, the 4th point whether a simple tag can include a classic tag which has its body-content set to JSP , what happens in that case.

Thank you so much

Yogesh
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic