This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes SimpleTag allows body-content as JSP? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "SimpleTag allows body-content as JSP?" Watch "SimpleTag allows body-content as JSP?" New topic

SimpleTag allows body-content as JSP?

Hai Lin
Ranch Hand

Joined: May 23, 2004
Posts: 79
Hi Guys,
Found another question in my mock exam for SCWCD 1.4


*Given that a tag testlib:myFirstSimpleTag extends SimpleTagSupport. What should be done so that scriptlet code can be used in the body of this tag?

Options Select 1 correct option.

A, body-content should be set to JSP in the TLD for this tag.
B, scripting-enabled should be set to true in the TLD for this tag.
C, Create a classic tag adapter for this tag that has the body-content of JSP.
D, This cannot be done because it is a Simple tag.

My answer is D, since I think SimpleTag only allows Jsp fragment which should not have JSP script. But the answer notes says: A SimpleTag can also have JSP code in the body if configured correctly.

Thanks a lot for solving this puzzle.

With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
subject: SimpleTag allows body-content as JSP?
Similar Threads
HFSJ - Custom Tag Development - Question 17 (Page 567)
A knowledge to share..
Please clear my doubt about Simple and Classic tags ...
Can anyone explain this Mock Question
passing dynamic vars to nested custom tag fails