尝试这个,
假设我的MAP是:
Map<String, String> countryList = new HashMap<String, String>();countryList.put("United States", "Washington DC");countryList.put("India", "Delhi");countryList.put("Germany", "Berlin");countryList.put("France", "Paris");countryList.put("Italy", "Rome");request.setAttribute("capitalList", countryList);因此,在JSP中,
<c:forEach var="country" items="${capitalList}"> Country: ${country.key} - Capital: ${country.value}</c:forEach>希望这可以帮助 !



