| Author |
SessionAttributes Doubt?
|
Joe Harry
Ranch Hand
Joined: Sep 26, 2006
Posts: 8795
|
|
Guys, The statement, "Attributes bound into a session are available to any other servlet that belongs to the same ServletContext" Will this be true or false?? if true why?
|
SCJP 1.4, SCWCD 1.4 - Hints for you, SCBCD Hints - Demnachst, SCDJWS - Auch Demnachst
Did a rm -R / to find out that I lost my entire Linux installation!
|
 |
Joe Harry
Ranch Hand
Joined: Sep 26, 2006
Posts: 8795
|
|
|
Any help guys?? I got this statement from HFSJ book!
|
 |
Chandra Bhatt
Ranch Hand
Joined: Feb 28, 2007
Posts: 1707
|
|
"Attributes bound into a session are available to any other servlet that belongs to the same ServletContext"
There is one ServletContext object per web application per JVM. If all session objects belong to one web application as are, attributes bound to session will be available to any servlet that belong to that particular web-app. It is what I could thought to be. Thanks,
|
cmbhatt
|
 |
Amol Nayak
Ranch Hand
Joined: Oct 26, 2006
Posts: 218
|
|
If the webapp is distributed the same Session object is used, but the ServletContext is one per jvm.. So "Attributes bound into a session are available to any other servlet that belongs to the same ServletContext" Is not true.. It can also be accessed from different ServletContext of the same distributed webapp. Amol...
|
 |
jayaram parisineni
Greenhorn
Joined: Apr 27, 2006
Posts: 6
|
|
Session attributes are not accessible by all servlets in a web - application, they are accessible by any servlet or Jsp which access that particular session.So the answer is false and reason is what i explained. Thanks, Jayaram
|
 |
 |
|
|
subject: SessionAttributes Doubt?
|
|
|