Bug 31009

Summary: io:http tag caches JSPWriter
Product: Taglibs Reporter: Andrew McCulloch <amccullo>
Component: IO TaglibAssignee: Tomcat Developers Mailing List <dev>
Severity: normal    
Priority: P3    
Version: nightly   
Target Milestone: ---   
Hardware: Sun   
OS: Solaris   

Description Andrew McCulloch 2004-09-02 03:18:02 UTC
When using the io:http tag with Tomcat 5.x a bug in the tag is exposed that 
was not exposed under tomcat 4.x.  The file URLTag.java (parent of 
HttpTag.java) caches the JspWriter between calls to endTag() and startTag().  
In Tomcat 5.x it appears that the Tag instances are being pooled and reused 
without a call to reset() before the reuse.  In this cas the Tag may be reused 
by a different page, or smae page in a different session.  When this happens 
the tag may write to a cached instance of the JspWriter instead of the current 
JspWriter causing blank output, or even output to the wrong user's browser.
Comment 1 Fredrik Harloff 2006-10-20 06:16:01 UTC
Just need to null reader and writer in doStartTag. I have been running this in
prod for 6 months.

    public int doStartTag() throws JspException {
        fullURL = null;
        connection = null;
>        reader = null;
>        writer = null;
        return EVAL_BODY_INCLUDE;

Would be nice if someone bothers to fix this issue :-)
Comment 2 Henri Yandell 2009-11-29 19:39:16 UTC
Resolving. Taglib has been retired.