• 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
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

Default value of body-content

 
Ranch Hand
Posts: 145
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Eat that pie! EAT IT! Now read this tiny ad. READ IT!
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic