Back
How can I loop through a HashMap in JSP?
<% HashMap<String, String> countries = MainUtils.getCountries(l);%><select name="country"> <% // Here I need to loop through countries. %></select>
<%
HashMap<String, String> countries = MainUtils.getCountries(l);
%>
<select name="country">
// Here I need to loop through countries.
</select>
Depending on what you want to accomplish within the loop, iterate over one of these instead:
30.9k questions
32.9k answers
500 comments
665 users