How to Iterate map in
jsp page using
struts tag ?..please help..
welcome.jsp
---------------------
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>WelcomePage</title>
</head>
<body>
<s:iterator value="#session.userMap" var="myVar">
<tr>
<td>
UserName : <s:property value="myVar.key.userName" />
</td>
<td>
Password: <s:property value="myVar.key.password" />
</td>
</tr>
</s:iterator>
</body>
</html>
public static HashMap<Integer,User> userMap=new HashMap<Integer,User>();
user map is defined in another
java class....
So please let me know how can we iterate map (userMap)