session.setAttribute() and session.getAttribute() would work too. ServletContext is shared by all components of all sessions. Session is shared by components of only that particular session. It's probably better to use session. Another possibility is to add the value you want to pass to page y as a request parm in the link to page y.
=========================================================================== To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant archives, FAQs and Forums on JSPs can be found at: http://java.sun.com/products/jsp http://archives.java.sun.com/jsp-interest.html http://forums.java.sun.com http://www.jspinsider.com