This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Servlets and the fly likes Attribute in ServletContext Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Attribute in ServletContext" Watch "Attribute in ServletContext" New topic
Author

Attribute in ServletContext

Haroldo Nascimento
Ranch Hand

Joined: Aug 14, 2003
Posts: 79
If I put attributes in the ServletContext I have the problem that this attributes will be visible per everybody ??? Using session I dont have this problem, because session is per browser. OK?
john smith
Ranch Hand

Joined: Mar 04, 2004
Posts: 75
There is one ServletContext per application so yes attributes of this object are avaliable application-wide. The Session object is bound to a particular session id and so is avaliable only to a particular client session.
 
Consider Paul's rocket mass heater.
 
subject: Attribute in ServletContext
 
Similar Threads
ServletContext is not distributable...
Attributes, Session and ServletContext
Access attribute of other Web Application
HFS page274, question7
Question on attributes