Hi Everyone,
I have a slight confusion on q17 of chapter 10.
Question:
given tag : SimpleTag --> Handler --> SimpleTagHandler
ClassicTag --> Handler --> ClassicTagHandler
Both the tag are declare to be
non empty and non tag dependent.
which of the following is/are valid, I understand the answer but dont understand the following options:
<my:SimpleTag>
<%= displayText %>
</my:SimpleTag>
and
<my:SimpleTag>
<my:ClassicTag>
<% i++; %>
</my:ClassicTag>
</my:SimpleTag>
According to the book, these options are wrong. but i think these are correct.
Reason Why i think so:
as both the tag's body is non empty and non tag dependent.
this means body content is either
JSP or Scriptless.
as it is not given in the question so above two options should be valid in case when body content is JSP.
however if body content is scriptless, then both above options should be wrong.