aspose file tools*
The moose likes Servlets and the fly likes Sharing Objects Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Sharing Objects " Watch "Sharing Objects " New topic
Author

Sharing Objects

Abiodun Adisa
Ranch Hand

Joined: Jan 17, 2002
Posts: 495
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

Joined: Jan 10, 2002
Posts: 61658
    
  67

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 ]

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Sharing Objects