It should work. Your problem lies elsewhere. Either you don’t use the code that you think you have, or you changed the source code too much to post this question, and it became correct by coincidence.
[] : , , . -n- SSCCE ( n-, : , -java-, java):
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@page import="java.util.Map"%>
<%@page import="java.util.HashMap"%>
<%
// NOTE: this code belongs (in)directly in a Servlet class.
Map<String, Object> map = new HashMap<String, Object>();
map.put("foo.bar", "fubar");
map.put("beh.moo", 1234567);
request.setAttribute("map", map);
%>
<html>
<head><title>test</title></head>
<body>
<p>Access map values by key: ${map['foo.bar']} ${map['beh.moo']}</p>
<p>Iterate over map values:
<c:forEach items="${map}" var="entry">
<br>${entry.key} = ${entry.value}
</c:forEach>
</p>
</body>
</html>
.