DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10138>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10138 pageContext declaration should be removed from HttpJspBase Summary: pageContext declaration should be removed from HttpJspBase Product: Tomcat 4 Version: Nightly Build Platform: All OS/Version: All Status: NEW Severity: Normal Priority: Other Component: Jasper 2 AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] The JSP Specification v1.2 states that the implicit object 'pageContext' should be page scope: "Objects with page scope are accessible only within the page where they are created. All references to such an object shall be released after the response is sent back to the client from the JSP page or the request is forwarded some- where else. References to objects with page scope are stored in the pageContext object." Therefore the declaration of "protected PageContext pageContext" should be removed from org.apache.jasper.runtime.HttpJspBase, since, as a member variable, it can never comply to the specification (the servlet engine manages the servlet class's lifecycle). Furthermore, it does not seem to be in use; JSP servlet classes generated by Jasper redeclare 'pageContext' as a local variable in _jspService(). This 'pageContext' member enables a JSP developer to write code like this, that compiles but will never work: <%! /* This method returns null-- Jasper should probably give a compiler error, since this is a dangerous pitfall for JSP developers. */ private PageContext getPageContext() { return pageContext; } %> <html> <body> <pre><%= getPageContext() %></pre> </body> </html> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>