I always had the impression that a redirect results in a completely new request to a new web page:
Originally posted by Mike Himstead:
...
To be honest, this was NOT the result I expected. I always had the impression that a redirect results in a completely new request to a new web page: ....
Close. The scoped variable (correct term for a bean placed in a scoped context) will be available to all resources participating in the same request. Typically, the scoped variable is set up by a servlet controller and is reference on a page forwarded to by that cotroller. But the scoped variable will also be available to other servlets that might be forwarded to, pages included by the JSP page, and any page forwarded to by a JSP page (rare in a properly structured web app).Originally posted by Mike Himstead:
If I declare a bean with request scope it will be available at the first page that gets the request, the next page gets a new request and won't have access to the bean.
All resources participating in the session, pages and servlets alike, will have access to session scoped variables.In session scope the bean will be available at all pages accessed within the same session.
Originally posted by Bear Bibeault:
Typically, the scoped variable is set up by a servlet controller and is reference on a page forwarded to by that cotroller. But the scoped variable will also be available to other servlets that might be forwarded to, pages included by the JSP page, and any page forwarded to by a JSP page (rare in a properly structured web app).
Did you see how Paul cut 87% off of his electric heat bill with 82 watts of micro heaters? |