File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
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
 
Consider Paul's rocket mass heater.
 
subject: findAncestorWithClass() Problem