From HFS chapter 10 question 17:
Given a tag, "simpleTag", whose handler is using SimpleTag and a tag, "complexTag", whose handler is using classic tag. Both tags are declared to be non-empty and non tagdependent in tld.
Which are valid use of these tags.
And this option (D) is invalid because of the scriptlet:
<my:simpleTag>
<my:complexTag>
<% i++; %>
</my:complexTag>
</my:simpleTag>
But why? SimpleTag body cannot be scriptlet but classic tag's body can be (look at the JSTL tag implementation from
tomcat and they are in classic tag and declared to be <body-content>
JSP</body-content>). So in above example, the body of <my:complexTag> should be allowed to have scriptlet!
Well, I do check this with Tomcat and above does really generate exception saying scriptlet is not allowed. I just dont understand why??