Bug 13731 - Final request, response, session and other variables.
Summary: Final request, response, session and other variables.
Alias: None
Product: Tomcat 4
Classification: Unclassified
Component: Jasper 2 (show other bugs)
Version: 4.1.12
Hardware: Other other
: P3 enhancement (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
Depends on:
Reported: 2002-10-17 13:23 UTC by Ruslan
Modified: 2010-12-16 18:36 UTC (History)
0 users

Patch to fix this problem, against 4.1.12 tomcat version (2.80 KB, patch)
2002-10-18 09:57 UTC, Ruslan
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ruslan 2002-10-17 13:23:42 UTC
Provide a capability to declare request, response, session and other variables 
in jspService function as final. As tunable feature, just like others, in 
tomcat`s web.xml file.

Why need this feature? To use request, response, session variables in anonymous 
implementations of classes. For example - declaration of iterator through 
elements, which includes some other JSP file (statically). And usage of this 
iterator in other JSP file.
Comment 1 Ruslan 2002-10-18 09:57:24 UTC
Created attachment 3528 [details]
Patch to fix this problem, against 4.1.12 tomcat version
Comment 2 Ruslan 2002-10-18 09:58:59 UTC
I have added a patch against 4.1.12 tomcat source to fix this problem.
However it simply forces all to be final.

Please evalute it on including in cvs tree.
Comment 3 Mark Thomas 2010-12-16 18:36:20 UTC
The patch provided does not appear to be against Tomcat 4.1.12 or any Tomcat version from 4.1.0 to 7.0.x.

I have reviewed the 7.0.x code and made variables final where I think it is safe to do so. session isn't final but you can always get that from request which is. The fix will be in 7.0.6 onwards.