aspose file tools*
The moose likes Servlets and the fly likes Hashtables in JSTL Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Hashtables in JSTL" Watch "Hashtables in JSTL" New topic
Author

Hashtables in JSTL

raj sekhar
Ranch Hand

Joined: Oct 16, 2001
Posts: 117
Hi
Am trying to read from hashtable using JSTL tags in JSP. What I found when doing a c:forEach is , with Hastables, it returns lastIn firstOut order from the Hashtable when I do the looping. How can I reverse it. I wud like to have FirstInFirstOut Oreder. Here's the code snippet:

<c:forEach var="item" items="${testHash}">
The next Hash key is <c ut value = "${item.key}"/> <br/>
The next Hash value is <c ut value = "${item.value}"/> <br/>
</c:forEach>

Also is there a good reference site for EL and JSTL with lot of examples ?

Thanks for u time.
RS
Daniel Hedrick
Greenhorn

Joined: Aug 08, 2003
Posts: 10
Uh, you might want to check the API for Hashtable. AFAIK, it does not promise any type of ordering. If you want your elements in a particular order, use a Collection class that supports it.

Good luck!

-daniel


There are 10 types of people in this world...<br />Those who understand binary, and those who don't.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Hashtables in JSTL