File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Nested Simple tags Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Nested Simple tags" Watch "Nested Simple tags" New topic
Author

Nested Simple tags

padma jyotsna
Greenhorn

Joined: Jun 07, 2010
Posts: 17
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
Bartender

Joined: Apr 07, 2010
Posts: 1695
    
  25

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

That is correct.

Regards,
Frits
padma jyotsna
Greenhorn

Joined: Jun 07, 2010
Posts: 17
Thanks Frits
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Nested Simple tags