Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

c:forEach session's map

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,everyone:
i have a trouble about EL showing the map collection.i put a map(Map<Object1,Object2>) into session.and i want to iterate the map data on my jsp page.the code is like that:
<c:forEach var="entry" items="${pcs}"> //pcs is the Map<Object1,Object2>
<td align="left">${entry.key.name}</td> //i want to show object1's name
</c:forEach>
But it doesn't work,so it's puzzle me a lot?anyone can tell me the problem?
 
sally bai
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello,a wonderful thing!i find the problem,because forget to import <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"; %>
 
I guess I've been abducted by space aliens. So unprofessional. They tried to probe me with this tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic