wood burning stoves 2.0*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes  findAncestorWithClass() Problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark " findAncestorWithClass() Problem" Watch " findAncestorWithClass() Problem" New topic
Author

findAncestorWithClass() Problem

Mohit G Gupta
Ranch Hand

Joined: May 18, 2010
Posts: 634

I am unable to understand how


functions.


could somebody provide an example that explains the working of findAncestorWithClass ?

OCPJP 6.0 93%
OCPJWCD 5.0 98%
Piyush Joshi
Ranch Hand

Joined: Jun 10, 2011
Posts: 207

Its a static method in SimpleTagSupport class.

You must have read the JavaDocs for this method.

For understanding how it works, here is the source code from Tomcat implementation:


Read the code above, its pretty straightforward to see how it has been implemented (see the for loop above).

I think now you can write an example yourself. Isn't it?


Piyush
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: findAncestorWithClass() Problem
 
Similar Threads
findAncestorWithClass() Versus getAdaptee()
HFS page 561, question 6
How to get a SimpleTag Parent inside Classic nested Tag ( have a look)
findAncestorWithClass
Another Simple Tag & Classic Tag handler mock exam question - what's YOUR answer?