Win a copy of Beginning Java 17 Fundamentals: Object-Oriented Programming in Java 17 this week in the Java in General forum!
  • 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:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • 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.
 
WHAT is your favorite color? Blue, no yellow, ahhhhhhh! Tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic