a question about Tag Files in HFSJ (2nd ed)
Posted: Mon Jun 23, 2014 12:33 am
I found a question about Tag Files in Head First Servlets and JSP (2nd edition).
Given a tag, simpleTag, whose handler is implemented using the Simple tag model
and a tag, complexTag, whose handler is implemented using the Classic tag model.
Both tags are declared to be non-empty and non-tag dependent in the TLD.
Which JSP code snippets are valid uses of these tag?
A. <my:simpleTag>
<my:complexTag />
</my:simpleTag>
The answer says this option is correct. But I don't think it is correct because "Both tags are declared to be non-empty and non-tag dependent in the TLD". It is obvious that the my:complexTag is invoked without a body. Am I right?
Given a tag, simpleTag, whose handler is implemented using the Simple tag model
and a tag, complexTag, whose handler is implemented using the Classic tag model.
Both tags are declared to be non-empty and non-tag dependent in the TLD.
Which JSP code snippets are valid uses of these tag?
A. <my:simpleTag>
<my:complexTag />
</my:simpleTag>
The answer says this option is correct. But I don't think it is correct because "Both tags are declared to be non-empty and non-tag dependent in the TLD". It is obvious that the my:complexTag is invoked without a body. Am I right?