• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

clarification about body-content

 
Mark heningen
Greenhorn
Posts: 25
  • 0
  • Mark post as helpful
  • send pies
  • 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?
 
Parth Twari
Ranch Hand
Posts: 163
  • 0
  • Mark post as helpful
  • send pies
  • 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
  • 0
  • Mark post as helpful
  • send pies
  • 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.
 
Consider Paul's rocket mass heater.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic