Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Application variables

Status
Not open for further replies.

Gaelle

Programmer
Jun 20, 2001
62
FR
Hello !
I would like to know : what exactly can I store in the application object ? (using application.setAttribute, for example)
I have a Vector that is used by any user of my intranet site, can I store it in the application object so that anyone can access it ?
Then : how long does such an application variable live ? Is it persistent ?

Thanks !
Gaelle.
 
>> Is it persistent ?

If you mean persistent accross executions of the server, no. You are left to implement that feature yourself.

The "lifetime" of application is for the execution of the web application. In other words it starts the first time a resource within that application is accessed. And is maintained until the application or server in most cases is stopped.

>> what exactly can I store in the application object

Code:
public void setAttribute(java.lang.String name,
                         java.lang.Object object)

so any Java Object, yes?
-pete
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top