learn java
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 The Software Craftsman this week in the Agile forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark " findAncestorWithClass() Problem" Watch " findAncestorWithClass() Problem" New topic

findAncestorWithClass() Problem

Mohit G Gupta
Ranch Hand

Joined: May 18, 2010
Posts: 634

I am unable to understand how


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?

Have you tried LearnNowOnline? http://www.learnnowonline.com/
subject: findAncestorWithClass() Problem