Win a copy of Mastering Non-Functional Requirements this week in the Design forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Nested Simple tags  RSS feed

 
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: 2939
208
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
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!