Hi there,
I'm using Sun's reference implementation, and all three cases are working
fine :-). Not sure about the JRun's implementation.
Lihua Sun
-----Original Message-----
From: EXT Kevin Jones [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 22, 1999 1:52 AM
To: [EMAIL PROTECTED]
Subject: Application vs Session vs Page
I've seen it mentioned on this list a few times that
Page = HttpServletRequest
Session = HttpSession
Application = ServletContext
so to 'pass' a bean to a jsp from a servlet (using RequestDispatcher),
for 'page' scope use req.setAttribute("TestPage", pageBean);
for 'session' score use sess.putValue("TestSession", sessionBean);
and for application scope use ctx.setAttribute("TestApplication",
appBean);
where req, sess and ctx are the expected types, and pageBean, sessionBean
and appBean are instances of a bean referenced on the jsp page using the
same names in the above three lines of code.
Using this code in a servlet - on the jsp page I 'forward' to I get the page
and session bean OK, but not the application bean, so I'm wondering if
anybody else has tried this and made it work?
I'm using JRun 2.3 BTW with IIS and I know the spec. isn't definite on where
beans with different lifetimes live, so I'm assuming this is a JRun problem,
could anybody confirm that?
Kevin Jones
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JSP-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".