bean not found within request scope, but session scope
Joined: Sep 02, 2003
I have A.jsp that creates a request scope bean and a form.
A servlet responds to form submit, and the servlet simply forwards the request to B.jsp, which uses the request scope bean.
I am getting error "bean my not found within scope". However, if I change the scope to "session", then everything works.
What I do not understand is why "request" scope does not work since both A and B are on the same request. As I debug the doGet() method of the servlet, I noticed that there is no attribute in the HttpServletRequest object parameter of doGet(), should not there be the bean I just created?
What I do not understand is why "request" scope does not work since both A and B are on the same request.
They are not in the same request. The first request ends when A is sent to the browser. The second request, in which you are noticing that no request attribute is available, is created when the form is submitted. [ October 31, 2005: Message edited by: Bear Bibeault ]