since getParent()method in classic tag returns a Tag reference and simple tags are not implemented Tag interface is it possible to access classicTag1 from the classicTag2 using getparent()method?
anybody home to help me?[/QB]
When the Tag.getParent() method encounters a SimpleTag, it wraps it into a TagAdapter instance (TagAdapter extends Tag but throws UnsupportedOperationException for all method implementations except getParent() and getAdaptee()).
This means that when navigating through the hierarchy of nested tags using Tag.getParent(), you need to check if the instance returned is actually a TagAdapter, which always encloses a SimpleTag. If so, use the TagAdapter.getAdaptee() method to extract the original SimpleTag.
This is also the reason why the SimpleTagSupport.findAncestorWithClass() method is preferred over the TagSupport.findAncestorWithClass(), because the SimpleTagSupport method automatically unwraps any TagAdapters, exposing the result simply as a JspTag (as with all Tags SimpleTags).
You may also want to check the J2EE API for TagAdapter: