• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Sharing Objects

 
Abiodun Adisa
Ranch Hand
Posts: 495
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
if i want to share objects between different sessions i would get a HttpSession and use the setAttribute method. Please how do i make my object available to the whole application
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64617
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Abiodun Adisa:
if i want to share objects between different sessions i would get a HttpSession and use the setAttribute method.
No. That would only make the object (termed a scoped variable) available to the same session.

Please how do i make my object available to the whole application
You can create the scoped variable in application context by calling setAttribute() on the servletContext.
[ December 01, 2007: Message edited by: Bear Bibeault ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic