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:
31k questions
32.8k answers
501 comments
693 users