| Author |
Tag Extensions
|
Kamal Tripathi
Ranch Hand
Joined: Oct 02, 2008
Posts: 86
|
|
1) Parents Topic
as per what I understood is that simple tags can take both simple as well as classic tags as parents but for classic tags to have simple tags as parents, we might need to use Tag Adapter class.
I wanted to know if for exam considerations.
This is a valid combination ??? Since HFSJ didn't discuss TagAdapter classes, I was of impression that this should not be considered a valid option per exam objectives.
2) Body-Content
JSPFragments don't support scripting so that means that we can't pass on scriptlets in the body of SimpleTag? And webapp won't be deployed if in the TLD I set <body-content> value to be JSP ??
What about ClassicTags. It is not possible to find out from the TLD whether a tag is simple or classic one so how would the entry of JSP for <body-content> be invalidated only for SimpleTags
|
Kamal Tripathi
SCJP 1.4 90%, SCWCD5 94%, Next SCDJWS--> In Naescent stage. Researching abt exam and material itself.
|
 |
Poonam Agarwal
Ranch Hand
Joined: May 12, 2008
Posts: 323
|
|
1) Parents Topic
Yes this a valid combination. simpleTags can have classic parents and classicTag can also have simpleTag as their parent , but for that it require little extra work. TagAdapter will do the work for you. beacuse classicTag's getParent() method returns the Tag , but simpleTag 's getParent() methos retuens the JspTag. so extra work is needed here to type cast the Tag to JspTag.
Please refer to the JSP specification 2.0 for more detail
|
Thanks <br />Poonam Agarwal SCWCD 86%
|
 |
 |
|
|
subject: Tag Extensions
|
|
|