• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

confused with getJspBody() method

 
geeta vemula
Ranch Hand
Posts: 208
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
this is from page 522 HFSJ (second edition) about JspFragment,

In that is it stated we dont have method to get the body contents of the tag like getBody or getContents. But in the previous page(520) in doTag() they have used getJspBody().invoke(null) to evaluate the body.. so can't we get bodycontents with getJspBody() itself?

Thanks,
Geeta
 
vani venkat
Ranch Hand
Posts: 142
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi geeta
getJspBodu() returns JSP fragment and invoke is called on jspfragment instance. so there are no direct methods in doTag to access body without calling invoke method on sp fragment. however we can get JspFragment using getJspBody()
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic