• Post Reply Bookmark Topic Watch Topic
  • New Topic

Nested Simple tags

 
padma jyotsna
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I have a question on Simple tags.
Suppose there is a Simple tag handler class with <name>mytag<name> in the TLD

considering the taglib directive is set appropriately in the jsp,
and calling nested tags as shown below , how many instances of the tag handler class will be created?

<test:mytag>
<test:mytag>
<test:mytag/>
</test:mytag>
</test:mytag>

will there be only One instance created.
or because Simple tag handler class instances are not reused by the container, for every tag invocation in the jsp, a new instance is created?

As per my understanding, there will be 3 instances created. is that correct?

Thanks
 
Frits Walraven
Creator of Enthuware JWS+ V6
Saloon Keeper
Posts: 2782
174
Android Chrome Eclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As per my understanding, there will be 3 instances created. is that correct?

That is correct.

Regards,
Frits
 
padma jyotsna
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Frits
 
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!