Forums Register Login

Application variables

+Pie Number of slices to send: Send
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.
+Pie Number of slices to send: Send
If you set application attributes they will be available until the application server is shutdown or until they are explicitly removed.
They are NOT persistent i.e. they will not be there if the server is shutdown and restarted. I would advise caution when using them however as you need to take issues like server clustering and they could potentially take up large amounts of memeory.
Who knew that furniture could be so violent? Put this tiny ad out there to see what happens:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 915 times.
Similar Threads
Storing an Java object in Access
passing parameters in jsp
How to transfer Objects from JSP to a Servlet?
How to store SecretKey in database?
Tapestry JavaBeans across pages
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 08:03:04.