You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2026/06/18 15:38:58 UTC

[Bug 70120] New: Problematic JSP custom tags returned to the tag pool to be reused

https://bz.apache.org/bugzilla/show_bug.cgi?id=70120

            Bug ID: 70120
           Summary: Problematic JSP custom tags returned to the tag pool
                    to be reused
           Product: Tomcat 9
           Version: 9.0.115
          Hardware: PC
            Status: NEW
          Severity: regression
          Priority: P2
         Component: Jasper
          Assignee: dev@tomcat.apache.org
          Reporter: jennifer.tracy.chung@gmail.com
  Target Milestone: -----

While rendering up a JSP page, if any error occurs that results in a JSP custom
tag instance getting corrupted, that "poisoned" tag doesn't get tossed away
anymore, and instead gets put back into the tag pool for reuse. 
Its reuse now results in blank/half-rendered pages, which only gets resolved by
a Tomcat restart.

This violates the JSP specification that specifies that JSP tags should never
be reused in case of an exception.

The 9.0.114 Tomcat commit that introduced the regression:
https://github.com/apache/tomcat/commit/868d87dae644d21aa957bde5ba25d0d97f51931f
--> Lines 2517+ added the finally block to call reuse tags, even if the tag has
become corrupted. 

This was previously reported and addressed in
https://bz.apache.org/bugzilla/show_bug.cgi?id=60497.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 70120] Problematic JSP custom tags returned to the tag pool to be reused

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=70120

jennifer.tracy.chung@gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 OS|                            |All
                 CC|                            |jennifer.tracy.chung@gmail.
                   |                            |com

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 70120] Problematic JSP custom tags returned to the tag pool to be reused

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=70120

Mark Thomas <ma...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #2 from Mark Thomas <ma...@apache.org> ---
OK. I think I have the complete picture (I'm using 9.0.x versions since that is
the only Tomcat version active for the full time-span).

As a result of bug 60947, tags that threw exceptions were no longer re-used.
That fix was in 9.0.0.M16.

Bug 69333 proposed an optimisation. The proposal was good but my implementation
was too eager. That change went into 9.0.96

The overly eager optimisation caused a regression (bug 69399) that was
incorrectly fixed in 9.0.114.

The fixed in 9.0.114 didn't revert enough of the changes and resulted in tags
that have thrown exceptions being re-used.

I have written some test cases to exercise all of the above and, after some
code changes (essentially reverting remainder of the overly eager optimisation)
those tests pass.

The fix will be in:
- 11.0.x for 11.0.24 onwards
- 10.1.x for 10.1.57 onwards
-  9.0.x for  9.0.120 onwards

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 70120] Problematic JSP custom tags returned to the tag pool to be reused

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=70120

--- Comment #1 from Mark Thomas <ma...@apache.org> ---
See also BZ 69333.

I think we need a test case (or test cases) that cover all the scenarios
described in at least these 3 bug reports.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org