When I reference 'session' or 'request' from within a method contained in a declaration, I get an 'Undefined variable' compile error. Why?

John Zukowski

The implicit objects session, request, etc. are defined in the JSP service method _jspService(). The are not instance level variables of the created JSP class. Hence, they are not immediately available to methods outside the service method. You would need to pass them in as parameters.

0 Comments  (click to add your comment)
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



About | Sitemap | Contact