aspose file tools*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes JSTL question 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 "JSTL question" Watch "JSTL question" New topic
Author

JSTL question

Abhishek Sharma
Ranch Hand

Joined: Jan 09, 2006
Posts: 68
Hi Ranchers,

Here is one question on JSTL core tags.




As per my observation it should be 2, 3.


Please correct me if i am wrong.
Manju Devarla
Ranch Hand

Joined: Dec 14, 2006
Posts: 85
To avoid scripting,declaration and expressions only we are going for custom tags..
madhav changala
Ranch Hand

Joined: Dec 20, 2005
Posts: 57
My answer is 1,2

As only Simple tags only doesn't accept scripting.. before simple tags. i.e classic tags are accepting scriptlets and expression etc..

Could any one confirm this..


Thanks®ards
Madhav


saivenumadhav
Niranjan Deshpande
Ranch Hand

Joined: Oct 16, 2005
Posts: 1277
yes..

simple tags dont accept scripting !


SCJP 1.4 - 95% [ My Story ] - SCWCD 1.4 - 91% [ My Story ]
Performance is a compulsion, not a option, if my existence is to be justified.
Abhishek Sharma
Ranch Hand

Joined: Jan 09, 2006
Posts: 68
well...ok, are you sure about Strings also (as specified in option one) and what do you say about option 3, can't we use "varStatus" inside the body of iteration tag. ???
Anupama Ponnapalli
Ranch Hand

Joined: Jun 12, 2006
Posts: 66
<table border=1 cellspacing=0 cellpadding=3>
<tr bgcolor="#CCFFFF">
<td><B>Loop Counter</B></td>
<td><B>Token</B></td>
</tr>
<c:forEach var="token" items="abc,def,ghi,jkl,mno,pqr,stu,vxyz" varStatus="statusKeeper" >
<tr>
<td>${statusKeeper.count}</td>
<td>${token} </td>
</tr>
</c:forEach>
</table>

works!
warren li
Ranch Hand

Joined: May 23, 2006
Posts: 128
My take is on 1 and 3. varStatus certainly can be used in the body, so 3 is correct.

Regarding 2, are you sure scripting is not allowed in JSTL core tags?
I don't remember it is mentioned somewhere.
[ March 12, 2007: Message edited by: warren li ]

SCBCD 1.3: 94%<br />SCWCD 1.4: 91%<br />SCJP 5: 95%
 
wood burning stoves
 
subject: JSTL question