All, Today's (duplicate) bug report about held references in JSTL tags has me thinking. What is the resistance to "fixing" the problem of object retention in these tags?
JSP 1.8.2 says that all page-scoped objects are released after the response is written or the request is forwarded to another handler. Doesn't that mean that something like this: <c:set var="foos" /> <c:forEach var="foos" items="$foos"> ... </c:forEach> will violate the spec by holding-on to the "foos" list indefinitely instead of flushing it after the response has been sent? I mean, I certainly understand the complaints being filed in BZ because, hey, the tags are holding onto these references and potentially eating up lots of memory. On the other hand, what's the resistance on the Tomcat side to "fixing" this? I can think of a couple of reasons: 1. This is a spec-compliance issue and the stance of the Tomcat team is that releasing these references violates the spec, and so it won't be done. 2. It's easy to disable tag pooling via configuration, which has the same effect as nulling all the data in these tag handlers. Since it's easy to disable tag pooling, there is no need to modify anything. 3. Nobody feels like writing a patch. I'd love to hear some comments. Thanks, -chris
signature.asc
Description: OpenPGP digital signature