request.getSession().getAttribute() and session.getAttribute()
Hi All,
Sorry guys, I'm a novice in web programming and this may sound like a stupid question to you guys... Here it goes...
Is there any difference between request.getSession().getAttribute() and session.getAttribute()?
I have tried doing the following in PAGE1:-
session.setAttribute("TEXT","novice");
objRequestDispatcher = request.getRequestDispatcher(PAGE2);
objRequestDispatcher.forward(request, response);
When in PAGE2, I'm able to get contents of "TEXT" by doing:-
request.getSession().getAttribute("TEXT");
1) so doessession andrequest.getSession() refers to the same object?
Can i do asession.getAttribute("TEXT") to get the contents too?
2) And if I have a PAGE3, am I able to retrieve contents of "TEXT" which is set in
PAGE1?
3) And also will I be able to get the contents of "TEXT" if I'm doing a
window.open() to go from PAGE1 to PAGE2?
I have tried to find out the answers by "try and error" but the more I tried the more confused I get...
Hope that someone can give me some advice.
Thanks in Advance.

