• 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
  • Liutauras Vilda
  • Paul Clapham
Sheriffs:
  • paul wheaton
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Piet Souris
Bartenders:
  • Mike London

HFSJ mock Q

 
Ranch Hand
Posts: 295
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Given a tag, simpleTag. whose handler is implemented using the Simple tag Model and a tag, complexTag, whose handler is implemented using Classic tag model. Both tags are declared to be non-empty in the TLD.

which JSP code snippets are valid uses of these tag?


A.<my:simpleTag>
<my:complexTag/>
</my:simpleTag>
B.<my:simpleTag>
<%=displayText %>
</my:simpleTag>
C.<my:simpleTag>
<%@ include file="/WEB-INF/web/common/headermenu.html"%>
</my:simpleTag>

D.<my:simpleTag>
<my:complexTag/>
<% i++; %>
</my:complexTag>
</my:simpleTag>



AC are correct.

I have read the HFSJ boot twice but these I could not able to answer.

Please give me the clarification how those are correct.

Tell me are these concepts explained in HFSJ covered? if yes tell me refrences please
[ August 03, 2008: Message edited by: Chintu sirivennela ]
 
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


A . Complex tag can have a Simple tag parent till Complex tag doesnt have any jsp script code .
because Complex Tag can have JSP as Body-content but the Simple Tag cant.

B.Simple Tag Cant have Scriptlet as body.

C.Simple tag can have directives which is not coming under JSP Script code.

Scriptless means it should not have Scriptlet,expression,declaration only.

D.Complex tag is having Scriptlet as a body which is correct.But the Simple Tag is the Parent tag which cant take the scriptlet as a body.


Am i clear ?
 
Amruth Puppala
Ranch Hand
Posts: 295
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi deepa raj,

Thanks for the answer. I'm clear about your answer.

So to answer this question if we know body-content of simple tag and classic we can answer easily right?
 
deepa raj
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic