• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Dare answer this question ???

 
Bassam Zahid
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Using JSTL 1.1, iterate this loop backwards:

<c:forEach begin="1" end="10" step="1" var="dare">
<c ut value="${dare}" default="out error"/>
</c:forEach>

Let us see who can iterate this loop from 10 to 1 !!!

 
Bassam Zahid
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Using JSTL 1.1, iterate this loop backwards:

<c:forEach begin="1" end="10" step="1" var="dare">
<cut value="${dare}" default="out error"/>
</c:forEach>

Let us see who can iterate this loop from 10 to 1 !!!
 
Bassam Zahid
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please make sure you don't come up with something like this:

<c:forEach begin="1" end="10" step="1" var="dare">
<cut value="10-${dare}" default="out error"/>
</c:forEach>
 
Bassam Zahid
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You must also know that for <c:forEach> tag the values for attributes must be:

"step" > 0
"begin" >= 0
"end" >= "begin"

Now dare iterate the above loop backwards !?
 
Rohit Bhagwat
Ranch Hand
Posts: 205
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I dont know how can you achieve this using jstl tags

Not possible !!
 
Rohit Bhagwat
Ranch Hand
Posts: 205
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
One more thing

Unless and untill you arent polite in posting your question, nobody is going to answer your question..

So I suggest you to please be polite irrespective of the difficulty level of your question.

Regards
Rohit.
 
Pushkar Raste
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi frnd,
The soln

<c:forEach begin="1" end="10" step="1" var="dare">
<c ut value="10-${dare}" default="out error"/>
</c:forEach>

won't work either. You must move '10' inside EL expression. so it shld be

<c:forEach begin="1" end="10" step="1" var="dare">
<c ut value="${10-dare}" default="out error"/>
</c:forEach>

Make sure that u urself r perfect b4 challenging others.


Thanks
Pushkar S. Raste
 
rakeshBhatia
Ranch Hand
Posts: 114
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have seen people scoring above 90% in SCWCD and being very polite and down to earth.

I find users of this forum very informative and helpful.

I agree that one has to be polite to get any positive response

Regards,

Rakesh Bhatia
 
Bassam Zahid
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I am really really sorry to all those who are offended by me. But to be true I did not mean it. I used such language because I only intended challenge, not offence. So I am once again sorry, I will configure a "PoliteFilter" in all future requests.

Thanks for you support.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic