When cookies are enabled to allow HttpSession support at the Web application server, JSP 1.0 makes the predeclared variable session available for use in JSP code. This variable is set automatically by the toolkit to the same session that is made available to toolkit operations; so both JSP code and operations can share data from the session-scoped data area.
<jsp:useBean id="myBean" scope="session" class="MyClass">
The JspContextServices bean would usually be defined with a page or request scope, since it requires a more frequently refreshed initialization. See transfer.jsp in the HTML Sample Application for an example.