Forums Register Login

Retrieve Values From Hashtable

+Pie Number of slices to send: Send
Ok I know this is very simple but unfortunately I can't do it. My problem is that I want to retrieve values from a Hashtable. I have this:


How can I make a loop while the Hashtable has elements to get the value?

Thanks
+Pie Number of slices to send: Send
<c:forEach> will loop over a Map without difficulty. Just be aware that the iteration items will be instances of Map.Entry.
+Pie Number of slices to send: Send
I have try to do it by this way:

but I have debug it and saw that lsAssement when is created although I have only 2 keys in hashtable is create a table of size 10 showing me the 2 keys at positions 1 and 2 of the table, 0 position is empty and then 'Ass_id' is getting the second key value instead of the first one.
Why is that?
+Pie Number of slices to send: Send
If you are doing this in a JSP, why the Java rather than JSTL and EL?
It's never done THAT before. Explain it to me tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 2561 times.
Similar Threads
Pass radio button/ text box responses from one page to another
Collections.synchronizedMap
help with testing a hashtable
how to retrieve value from autogenerated(oracle sequence) column in a servlet.
servlet and checkbox state
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 04:47:49.