• 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:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

body-content values

 
Ranch Hand
Posts: 393
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Select all valid values for the <body-content> attribute in a TLD? [Check all correct answers]
1. empty 2. JSP 3. dependent 4. HTML 5. code

Answers given by j2eecertificate.com is : 1 & 2.

According to me "JSP" is invalid. I checked the spec, it gave the following examplination
<Spec>
A TLD is invalid if it specifies �JSP� as the value for
<body-content> for a tag whose handler implements the SimpleTag interface. JSP containers are recommended to but not required to produce an error if �JSP� is specified in this case.
</spec>

So does this mean the JSP can be one of the values in the <Body-content> attribute.

shashank
 
Ranch Hand
Posts: 256
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
For classic custom tags(implementing Tag,IterationTag or BodyTag interface) the valid values are

scriptless
JSP
empty
tagdependent

For Tag handlers implementing the Simple tag interface the valid values are

empty
scriptless
tagdependent
 
Nikhil Jain
Ranch Hand
Posts: 393
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks, is there any mention of this distiction in HFS book?
 
Nikhil Jain
Ranch Hand
Posts: 393
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I am getting very confused on Body-Content values. There are three categories for Body-Content
1. Tag File {scriptless(default), empty, tag-dependent}
2. Simple Tag (empty, scriptless, tag-dependent}
3. Class Tag {empty, scriptless, tag-dependent, JSP(default)}

I found many threads on this question, but I am not able to grasp the concept.

1. Are the above values right?
2. Why there is no default value for classic simple tag. & secondly, why there is even a JSP as one of the values. What is the logic behind it. This topic is not given clearly in HFS. Can I get some notes on it.

Thanks
Shashank
 
Gaurav Gambhir
Ranch Hand
Posts: 256
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
1.The above values are perfectly right
2.The default value for body-content in JSP 1.2 was �JSP�. However SimpleTag handler and tag files donot allow nested JSP syntax in the body and hence the value �JSP� is invalid for their body-content. So the specification donot define the default value anymore.A reasonable default for Simple tag handler could be scriptless if the tag can have a body, but it depends on implementation.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic