• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

no body-cnotent in a tag

 
jyothi sanka
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<tag>
<name>Hello</name>
<tag-class>com.abc.HelloTag</tag-class>
<body-content>empty</body-content>
</tag>

If there is no <body-content> element then what is the result(container throws exception or takes any default value(scriptless or jsp)?
 
Praveen Kumar Mathaley
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
default value is JSP
 
Durgaprasad Guduguntla
Ranch Hand
Posts: 99
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The default value of <body-content> for Classic taghandlers is JSP. What is the default value in case of Simple taghandler? Scripting is not allowed inside the body of the Simple tags right?
 
kk nn
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It is defaulted to 'scriptless'
 
Jose Esteban
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There's NO LONGER DEFAULT VALUES for the <body-content> element. According to JSP 2.0 spec page 3-29:
"The default in JSP 1.2 was "JSP" but because this is an invalid setting for simple tag handlers, there is no longer a default in JSP 2.0."
 
Ganeshji Marwaha
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I agree with Jose... There will be a deploy-time error, i guess, if you dont put in a body-content tag
 
Jose Esteban
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sure, it is a mandatory element.
 
Praveen Kumar Mathaley
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yes, it's an mandatory element in jsp2.0

thank you...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic