a question about Tag Files in HFSJ (2nd ed)

Moderator: admin

Post Reply
icepeanuts
Posts: 53
Joined: Thu Nov 22, 2012 12:01 am
Contact:

a question about Tag Files in HFSJ (2nd ed)

Post by icepeanuts »

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?

Online
admin
Site Admin
Posts: 10068
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

Re: a question about Tag Files in HFSJ (2nd ed)

Post by admin »

Non-empty doesn't mean you have to have something in the body. It can be empty as well.
But did you check with the authors? What did they say?

thank you,
Paul.
If you like our products and services, please help us by posting your review here.

Post Reply

Who is online

Users browsing this forum: No registered users and 76 guests