aspose file tools*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes HFSJ mock Q Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "HFSJ mock Q" Watch "HFSJ mock Q" New topic
Author

HFSJ mock Q

Amruth Puppala
Ranch Hand

Joined: Jul 14, 2008
Posts: 295
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 ]

SCJP 5 |SCWCD 5| Started thinking about Web Services ?
deepa raj
Ranch Hand

Joined: Jul 25, 2008
Posts: 124


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

Joined: Jul 14, 2008
Posts: 295
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

Joined: Jul 25, 2008
Posts: 124
Yes.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: HFSJ mock Q