• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Custom Tags

 
Sahul Yasin
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

Pls clarify my below doubts in Custom Tags.

1.The JspFragment of the tag body is invoked by the container before the
doTag() method is called. This value, a BodyContent object is passed to the tag handler using the setJspBody() method.

---> Based on the tag life cycle, it seems to me that the above is true,
but it is not.(KB's Page:564) Pls help me to understand the concept.

2. In KB's Page 491,it is mentioned that tag-file is better than <jsp:include>. But later pages says that we can not use any JSP directives such as page, include and taglib in tag-file. Then how could we say that the tag-file is better than <jsp:include>?...

Thanks in advance.

Regards,
Yasin
 
Kevin DesLauriers
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can use the regular JSP directives in a tag-file except the tag directive replaces the page directive. You do not have to declare the attributes in a TLD if you use the attribute directive (not on the SCWCD exam). There is also a variable directive for synchronizing page scoped variables (also not on SCWCD).

I hope that clarifies the latter part of your question.

Kevin
 
Sahul Yasin
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Kevin. Any idea about my 1st doubt.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic