This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Classic Tag Handler Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Classic Tag Handler" Watch "Classic Tag Handler" New topic

Classic Tag Handler

Nabila Mohammad
Ranch Hand

Joined: Nov 05, 2007
Posts: 661
I running this program mentioned in HFSJ to check out the sequence of how the program is getting executed.

This is my file

And my itty.jsp

My output is :

CLassic Tag as follows:
BEFORE the tag IN doStartTag() I am the body
IN doAfterBody() 0
I am the body of the page
IN doAfterBody() 1
I am the body of the page
IN doAfterBody() 2
I am the body of the page
IN doEndTag()
AFTER the tag

My Question is why are the names of the movie getting displayed in a table right at the end (after it completes the iteration from doAfterBody() and body of the tag which has<tr><td> in it)

I thought name of the movie shoud be after "I am body of the page" .
(Even though that won't make sense as it is supposed to display in the table format)

Can some one help me with this ?


The future belongs to those who believe in the beauty of their dreams.Dream BIG!
Frits Walraven
Creator of Enthuware JWS+ V6

Joined: Apr 07, 2010
Posts: 1529


It is just because of the bad formed HTML that the browser displays it differently.

Have a look at the page source:

Nabila Mohammad
Ranch Hand

Joined: Nov 05, 2007
Posts: 661
Got it.. Thanks!
I agree. Here's the link:
subject: Classic Tag Handler
Similar Threads
Classic Tag Handler
Tag Handler - how to capture body of a tag???
Unable to initialize TldLocationsCache: XML parsing error on file
doEndTag() executed before doAfterBody()