aspose file tools*
The moose likes JSP and the fly likes How does JSP Nested Tag Handler gets invoked? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "How does JSP Nested Tag Handler gets invoked?" Watch "How does JSP Nested Tag Handler gets invoked?" New topic
Author

How does JSP Nested Tag Handler gets invoked?

Mani Rai
Greenhorn

Joined: Dec 26, 2012
Posts: 4
I am learning custom tags based on the example of JEE 5 "Dukes Bookstore". It uses a following nested tags:


My confusion is how does each of the tag handler gets invoked? According to what i understood and following tag handele doTag method:


The nested tag handler should be invoked when getJspBody().invoke(null) is called. Another confusion is, when "definition" tag is called at the very begining, does it completes the doTag method before running other nested tag handlers?
Albareto McKenzie
Ranch Hand

Joined: Apr 08, 2009
Posts: 298
As you said the body of the tag (in your case nested tags) will be invoked when the getJspBody().invoke(null); happens. About your last question and just talking about your example, answer is no. doTag method starts, then creates a HashMap and immediately after that it invokes the doTag method of your tt:screen tag, you can see that by debugging both methods. When it has finished the doTag of your nested tag will continue with the execution of the next line (Definition definition = new Definition(); ).

Cheers!
 
jQuery in Action, 2nd edition
 
subject: How does JSP Nested Tag Handler gets invoked?