File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

HFSJ mock Q

 
Amruth Puppala
Ranch Hand
Posts: 295
  • 0
  • Mark post as helpful
  • send pies
  • 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 ]
 
deepa raj
Ranch Hand
Posts: 124
  • 0
  • Mark post as helpful
  • send pies
  • 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
  • 0
  • Mark post as helpful
  • send pies
  • 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
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic