Mantis - Resin
Viewing Issue Advanced Details
908 minor always 02-02-06 11:45 02-02-06 16:21
koreth  
ferg  
normal  
closed 3.0.17  
fixed  
none    
none 3.0.18  
0000908: Custom taglib tag that implements TryCatchFinally can result in duplicate variable declaration
If I have a JSP like

<% int t = 0; %>
<foo:customTag> ... </foo:customTag>

where the class for the custom tag implements javax.servlet.jsp.tagext.TryCatchFinally, the resulting JSP won't compile. The reason is that the generated Java code contains a "catch" clause like:

catch (Throwable t) { }

but there is already a "t" declared in the .java file. The variable name in the "catch" should be something that's less likely to collide with a user-defined variable, e.g. "_jsp_trycatchfinally_throwable" or something like that.

(I realize Sun's Javadoc for the TryCatchFinally interface has example code with "t" as the variable name, but other app servers don't use that name, so Resin fails to compile JSPs that work fine in other servers.)

Notes
(0000851)
ferg   
02-02-06 16:21   
jsp/1865