Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

HFS Page 517

 
Divya Guttikonda
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

It is given in HFS book page 517:
If the tag is declared to have a non-empty body, then setJspBody() method will not be called if the tag invoked in either of these two ways:
<foo:bar/>
<foo:bar></foo:bar>

My question is does this also imply for
<foo:bar>
<jsp:attribute name=....>
</foo:bar>
Assuming <jsp:attribute> is correctly defined.
Can someone clear my doubt?

Thanks
Divya.
 
shiva viswanathan
Ranch Hand
Posts: 152
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI Divya ,

If you read HFSJ book carefully it will be clearly mentioned that
<jsp:atribute> does not count as body

Even a tag declared to have a body content of empty can
jsp:attribute

it is equivalent to specifyng an attribute as
<mytag:simple tag1value="verySimple" />

<mytag:simple>
<jsp:attribute name="tag1value" value="verySimple">
</mytag:simple>

Hope you got the point

Catch You Later
Shiva
 
Divya Guttikonda
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi shiva

Thanks for the reply.Even i thought the same but i just want to clarify the things.Anyway thanx for the reply.
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!