• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

SimpleTag allows body-content as JSP?

 
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Guys,
Found another question in my mock exam for SCWCD 1.4

Problem:

*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.

Hai
 
When it is used for evil, then watch out! When it is used for good, then things are much nicer. Like this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic