(i) looping the contents (
(ii) retrieve the data from HashMap using the key( map["key"]).
I preferred the later approach since it was more performance effective.
Map
map.put(1, "Monday");
map.put(2, "Tuesday");
map.put(3, "Wednesday");
By modifying the key type in HashMap to String the values were retrieved and displayed in the Page.
Map
map.put("1", "Monday");
map.put("2", "Tuesday");
map.put("3", "Wednesday");
My inference from this is that EL does not support the Interger wrapper class for HashMap.But I could not find any documentation to confirm this.
No comments:
Post a Comment