Head First servlets and JSP
chapter9 Using JSTL
5.
Which <body-content> element combinations in the TLD
are valid for the following JSP snippet? (Choose all that apply.)
A. tag1 body-content is empty
tag2 body-content is JSP
tag3 body-content is scriptless
B. tag1 body-content is JSP
tag2 body-content is empty
tag3 body-content is scriptless
C. tag1 body-content is JSP
tag2 body-content is JSP
tag3 body-content is JSP
D. tag1 body-content is scriptless
tag2 body-content is JSP
tag3 body-content is JSP
E. tag1 body-content is JSP
tag2 body-content is scriptless
tag3 body-content is scriptless
correct-B,C,E
Tag1 includes scripting code so it must have at
least 'JSP' body-content. Tag2 is only shown
as an empty tag, but it could also contain 'JSP'
or 'scriptless' body-content. Tag3 contains
no
scripting code so it may either JSP or scriptless body-content
In the answer its mentioned that Tag3 can have JSP or scriptless as body content
IF JSP is the body content,then it can have scriplets,declarations.
IF scritpless is body content ,then it can have no scripltes,declarations.
i find theses two statements as contradictory.so,
How can Tag3 have JSP or scriptless as body content ?