• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

"Implicit object shared by multiple requests and sessions"???

 
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
After going through Head First, I am quickly going through the Manning SCWCD Study Kit. Here is a quote that has me completely confused (hope I am allowed to copy a small snippet here):


The six implicit objects�response, out, page, pageContext, config, and
exception�are also considered to have page scope by the JSP specification. They are all maintained by the pageContext container object and can be obtained using their respective getter methods.

However, their existence and accessibility is somewhat different from the user definedobjects. Although the JSP specification defines these implicit objects as being in the page scope, they are not logically restricted to that scope. For example, the page implicit object refers to the generated servlet instance. For the same servlet instance, if there are multiple threads that are serving multiple requests, possibly even in multiple sessions, then the same implicit object page is shared by all those threads and is thus accessible by all the requests and in all the sessions.



Since once instance of a servlet is created (unless you use the SingleThreadModel), aren't there always going to be mutiple threads that serve multiple requests involving multiple sessions if you have lots of users accessing the same servlet? Then you're telling me that the page, request, session objects can be shared across these threads? This can't be right? If one thread says request.setAttribute("userName", userName) then another thread can change this particular request object which is shared? This can't be right
 
Ranch Hand
Posts: 643
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i have found this in FREDERIC pdf.
 
Gowher Naik
Ranch Hand
Posts: 643
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
sorry i have posted above statement in wrong thread.
 
I'm THIS CLOSE to ruling the world! Right after reading this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic