I seem to have a memory leak in my Web Application which occurs when using the JSTL <c:forEach> tag. More specifically I'm using the tag to iterate through an ArrayList of objects. The contents of the ArrayList are the result of a query. The arraylist is added to the session by a servlet using session.setAttribute(). However even on invalidating the session, the value bean class still remains in memory. If I add the ArrayList to the session, but never access it with <c:forEach> then the memory leak disappears.
I've used Quest JProbe to discover this. Which seems to point at Tomcat being the source of the problem, which gives a path from the offending object as: JspRuntimeContext -> Collections$SynchronisedMap -> HashMap -> HashMap$Entry -> HashMap$Entry -> JspServletWrapper -> index_jsp -> TagHandlerPool -> Tag[ ] -> ForEachTag -> Offending Object Can anyone provide any information or feedback on this. Many Thanks - Gareth Gareth J Hall [EMAIL PROTECTED] mobile: +447971037081 MSN: [EMAIL PROTECTED] AOL: gaz207
