Iterating List of Maps through c:foreach
posted 16 years ago
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
hi all,
I have a list of maps.
Now I want to iterate the list in jsp page where i will give the key hardcoded to the map so that it returns the value corresponding to key.
Can somebody tell me how can I do that?
The bolded portion written in code does not work in foreach I suppose.
Please suggest.
Thanks,
Kousik
I have a list of maps.
Now I want to iterate the list in jsp page where i will give the key hardcoded to the map so that it returns the value corresponding to key.
Can somebody tell me how can I do that?
The bolded portion written in code does not work in foreach I suppose.
Please suggest.
Thanks,
Kousik
Thanks in Advance,
Kousik
posted 16 years ago
I guess this is a typo ?
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
I guess this is a typo ?
SCJP 5 | SCWCD 5
[How to ask questions] [Twitter]
Kousik Majumder
Ranch Hand
Posts: 244
posted 16 years ago
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
yes,
That is a typing mistake.
That is a typing mistake.
Thanks in Advance,
Kousik
posted 16 years ago
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
Hi, Kousik. Use for getting keys.
Use for getting values.
Use for getting values.
SCJP5.0, SCWCD5.0, OCEJPAD6, OCPJWSD6
Kousik Majumder
Ranch Hand
Posts: 244
posted 16 years ago
this will give the keys and values respectively which I do not want. I want a value with a particular key which i will give from outside like I showed before/below.
How can I do that?
Thanks,
Kousik
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
this will give the keys and values respectively which I do not want. I want a value with a particular key which i will give from outside like I showed before/below.
How can I do that?
Thanks,
Kousik
Thanks in Advance,
Kousik
posted 16 years ago
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
Try this,
Here the KEY is name of the attribute and the value must be your HashMap key. For example, pageContext.setAttribute("KEY","java"); Here "java" must be your HashMap key.
Here the KEY is name of the attribute and the value must be your HashMap key. For example, pageContext.setAttribute("KEY","java"); Here "java" must be your HashMap key.
SCJP5.0, SCWCD5.0, OCEJPAD6, OCPJWSD6
| Uh oh, we're definitely being carded. Here, show him this tiny ad: Paul Wheaton's 16th Kickstarter: Gardening playing cards for gardeners and homesteaders https://coderanch.com/t/889615/Paul-Wheaton-Kickstarter-Gardening-playing |












