Bug 13731

Summary: Final request, response, session and other variables.
Product: Tomcat 4 Reporter: Ruslan <contact>
Component: Jasper 2Assignee: Tomcat Developers Mailing List <dev>
Severity: enhancement    
Priority: P3    
Version: 4.1.12   
Target Milestone: ---   
Hardware: Other   
OS: other   
Attachments: Patch to fix this problem, against 4.1.12 tomcat version

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.