A friend of mine (Jailton Lopes) reported a wierd behaviour in the following code: JSP: <c:out value = "${requestScope.dummyValue}"> ABCDEFGHIJLMN<br> </c:out> <c:out value = "${requestScope.otherDummyValue}"/> Output: ABCDEFGHIJLMN ABCDEFGHIJLMN The problem is that the second call to <c:out> is printing the default value of the previous call (which was set in the tag's body). After some research, I realized that's caused because Tomcat is pooling the tag handlers and OutSupport returns EVAL_BODY_BUFFERED. One way to solve the problem is setting Tomcat to not pool the handlers, but that's not an elegant solution. The ideal solution would be delegate the task of cleaning up its state to the tag handlers. As the tag handler API doesn't have a init() or similar method, we can do that on doStartTag(), as shown below: Original code: public int doStartTag() throws JspException { needBody = false; // reset state related to 'default' New code: public int doStartTag() throws JspException { needBody = false; // reset state related to 'default' this.bodyContent = null; // clean-up body (just in case container is pooling tag handlers) I'm doing these changes now, so we can fix this issue on 1.0.5 and 1.1.0.
Committed changes to CVS - waiting for TCK tests to mark bug as fixed.
Closed, as TCK ran fine.