• Post Reply Bookmark Topic Watch Topic
  • New Topic

problem with Servlet Context

 
Dhananjay Ghanwat
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ,
can some one hlep me out with this problem.
I have an object in Servlet context scope,
and I have 2 Users logged on to my system.
If one of the User updates any property of the object in Servlet context will the Second user be able to get the Latest (I mean modified by the First User) data.
Or do all users have to Log out and then Log in again.
Thanks in advance.
 
R K Singh
Ranch Hand
Posts: 5388
1
Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
other user will get the updated value if first user changes the value.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65516
105
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The servlet context is shared across an entire web app context. If you need per-user storage, you should place the object on the session.
hth,
bear
[ July 04, 2003: Message edited by: Bear Bibeault ]
 
Dhananjay Ghanwat
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks ,I know this is a design flaw to keep in Servlet context but i have far exceeded the point to change it to session.
I didn't understand Ravish Kumar's statement
Can you kindly explain why only when the first user chnages it will be updated and why not by the Second user.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!