• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

SimpleTag allows body-content as JSP?

 
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • 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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
    Bookmark Topic Watch Topic
  • New Topic