posted 17 years ago
I have a simple bean that I�m storing in a session (say- page1.jsp) and then forwarding the request to another web component (say- page2.jsp); wherein I�m checking for the session attribute. In case the attribute is not found, I�m redirecting the client to the login page (say- login.jsp).
It�s strange to note that when I�m forwarding (a RequestDispatcher forward() call) the request after storing attribute in the session (in page1.jsp); every time when I open a new browser window and directly try to access page2.jsp I don�t get redirected to the login page, but, when I do a redirection form page1.jsp, and then I open a new browser window (trying to access page2.jsp), I get redirected to the login page.
I know that the basic difference between a redirect and a forward is that the former makes a roundtrip to the server, whereas, a forward call does a request forwarding at the server end and the address bar of the browser window remains unchanged.
But, I still don�t get that why Server Side Forwarding is not working here.