• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Custom Tags

 
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Kevin. Any idea about my 1st doubt.
 
The only cure for that is hours of television radiation. And this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic