aspose file tools*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes mock exam  jstl core iteration custom tags 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 "mock exam  jstl core iteration custom tags" Watch "mock exam  jstl core iteration custom tags" New topic
Author

mock exam jstl core iteration custom tags

rehans oberoi
Ranch Hand

Joined: Dec 06, 2005
Posts: 174
which two are true about the jstl core iteration custom custom tags
(choose two )

1. it may iterate over arrays , collections , maps and strings
2. the body of the tag may contain EL code , but not scripting code
3.when looping over collections , a loop status object may be used
in the tag body .
4. it may iterate over a map , but only the key of the mapping may
be used in the tag body
5. when looping over integers (for example begin i= '1' end = '10')
a loop status object may not be used in the tag body


hi ranchers
which is the most appropriate answer
according to u

thanks
[ December 15, 2005: Message edited by: rehans oberoi ]
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

1,3


[My Blog]
All roads lead to JavaRanch
Vishnu Prakash
Ranch Hand

Joined: Nov 15, 2004
Posts: 1026

2. the body of the tag may contain EL code , but not scripting code



Excerpt from c.tld(Core)


[ December 15, 2005: Message edited by: Vishnu Prakash ]

Servlet Spec 2.4/ Jsp Spec 2.0/ JSTL Spec 1.1 - JSTL Tag Documentation
Vishnu Prakash
Ranch Hand

Joined: Nov 15, 2004
Posts: 1026

5. when looping over integers (for example begin i= '1' end = '10')
a loop status object may not be used in the tag body


I feel 5th is also correct. As even without LoopTagStatus we can iterate from 1 to 10.
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

Tricky indeed.

I read it as :
5. when looping over integers (for example begin i= '1' end = '10')
a loop status object CAN not be used in the tag body

which would be false, because a loop status can also be used in this case.
Vishnu Prakash
Ranch Hand

Joined: Nov 15, 2004
Posts: 1026

(choose two )


Now we got 3 correct answers.
Lakshmi Narayanan
Ranch Hand

Joined: Apr 29, 2008
Posts: 58
2. the body of the tag may contain EL code , but not scripting code

I have question on this.
What is the meaning not scripting code. I can do this.
<cx:forEach var="temp" items="${requestScope.list}" >
<cx ut value="${temp}" />
<%=mb.getLabel()%>
<%
out.println("Lakshjssss");
%>
</cx:forEach>

It means this should be true right because body-content is JSP. it allows everything


Thanks<br />Lakshmi<br />SCJP 1.4 - 90%<br />SCWCD 5 - 89%
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: mock exam jstl core iteration custom tags