• 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
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

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.
 
Rototillers convert rich soil into dirt. Please note that this tiny ad is not a rototiller:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic