• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

Dare answer this question ???

 
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Using JSTL 1.1, iterate this loop backwards:

<c:forEach begin="1" end="10" step="1" var="dare">
<c:out 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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">
<c:out value="10-${dare}" default="out error"/>
</c:forEach>
 
Bassam Zahid
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 !?
 
Ranch Hand
Posts: 205
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 114
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
How do they get the deer to cross at the signs? Or to read this tiny ad?
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic