The session implicit variable is only in scope inside the service method of your JSP. It is not available to declarations.
The best way to understand this is to take a look at the .java file that the container creates on behalf of your JSP.
If you want to reference the session from declared methods (shudder), or within Javabeans, you need to explicitly pass it (or the request, from which you can obtain the session). [ May 13, 2005: Message edited by: Bear Bibeault ]