• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

clarification about body-content

 
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi everybody,
I looking for a clarification about body-content in a tag
In HF book 2nd ed. page number 482, it is mentioned that there are foolowing values for this tag: empty, scriptless, tagdependent, and JSP.
I saw one question in one mock exam( i don’t remember the referance, sorry) and in that question it was mentioned JSP was valid until 1.2. so i looked in jsp2.0 specification and found

Can anyone explain about JSP value in body-content tag?
 
Ranch Hand
Posts: 163
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi mark

yes , it has a straight forward explaination

In HF book 2nd ed. page number 482, it is mentioned that there are foolowing values for this tag: empty, scriptless, tagdependent, and JSP.



Hf is talking about Tags and here specifically Classic tags(doStarttag() one).
they can have all this as body-content

But here

# From jsp2.0 specification.
# tag_directive_attr_list ::=
# { display-name=”display-name” }
# { body-content=”scriptless|tagdependent|empty” }
# { dynamic-attributes=”name” }
# { small-icon=”small-icon” }
# { large-icon=”large-icon” }
# { description=”description” }
# { example=”example” }
# { language=”scriptingLanguage” }
# { import=”importList” }
# { pageEncoding=”peinfo” }
# { isELIgnored=”true|false” }



jsp spec is talking about tag directive of a tag file! Since tag files cannot have scripting in their body content , this is why they cannot have JSP as their body-content

So since tag directive is valid only for tag files , here there is no JSP in spec.

For body-content

Tag Files - can have { body-content=”scriptless|tagdependent|empty” } Defaults to scriptless.
Simple Tags can have { body-content=”scriptless|tagdependent|empty” } Default probabaly scriptless(please someone clarify)
Classic tags can have { body-content=”scriptless|tagdependent|empty|JSP” } Default probabaly JSP(please someone clarify)
 
Parth Twari
Ranch Hand
Posts: 163
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Clarified my own doubt with this link

http://faq.javaranch.com/java/BodyTagContent

Feels like i read FAQS so late in life.
 
reply
    Bookmark Topic Watch Topic
  • New Topic