hi i have define hashmap like this in java class
so i need this map data into jsp page in table formatpublic static HashMap<String,List<String>> taskMgmt() { HashMap<String,List<String>> m=null; try { List<String> list = new ArrayList<String>(); list.add("AddConference"); list.add("Registration"); list.add("UpdateConference"); list.add("DeleteConference"); list.add("Login"); list.add("webScraping"); List<String> list1 = new ArrayList<String>(); list1.add("9th Apr,2013"); list1.add("10th Apr,2013"); list1.add("11th Apr,2013"); list1.add("12th Apr,2013"); list1.add("13th Apr,2013"); list1.add("14th Apr,2013"); List<String> list2 = new ArrayList<String>(); list2.add("9th Apr,2013"); list2.add("10th Apr,2013"); list2.add("11th Apr,2013"); list2.add("12th Apr,2013"); list2.add("13th Apr,2013"); list2.add("14th Apr,2013"); List<String> list3= new ArrayList<String>(); list3.add("1d"); list3.add("2d"); list3.add("1d"); list3.add("2d"); list3.add("1d"); list3.add("3d"); m=new HashMap<String,List<String>>(); m.put("name", list); m.put("start",list1); m.put("end",list2); m.put("duration",list3); System.out.println("HashDao"+m); } catch(Exception e) { e.printStackTrace(); } return m; } }
for this i have written jsp code like
<table border=1 ><tr><th>Name<th></th><th>Duration</th><th>StartDate</th><th>EndDate</th></tr>
<%
HashMap<String,List<String>> loans=ListDao.taskMgmt();
Set<Map.Entry<String, List<String>>> entrySet = loans.entrySet();
for (Entry entry : entrySet) {%>
<tr><td><%=entry.getKey() %></td><td><%=entry.getValue() %></td></tr>
<%} %>
</table>
i need the data like i defined in table headers please help
thanks in advance