Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

findAncestorWithClass

 
Amit Tayal
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All
As per HFSJ Q6 (page 551)
method findAncestorWithClass(String,class) is defined in standard Tag interfaces

Please let me know the name of the stnadard Tag interface that defines the above mentioned method.


Thanks in advance
Amit
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Classes SimpleTagSupport and TagSupport
 
Shivani Chandna
Ranch Hand
Posts: 380
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
To add more: This method is not declared in any interface but is defined in the classes mentioned above.

Rgds.
 
Amit Tayal
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the clearing my doubts.
 
Prabhakar Edward
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey Dude,

Pl. check your method signature:
In TagSupport it is like this: findAncestorWithClass(Tag from, Class klass)
and in SimpleTagSupport it is like this: findAncestorWithClass(JspTag from, Class klass)..

Pl. note the first parameter in each case.Also this is the only static method for this whole certification.

Hope this helps...
 
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!