I store the user's Vector in a Session Object.
So, how each user has a session, I think it is possible to use an Arraylist.
When a I need to get the data, I declare a vector variable and set to session object.
This is a thread-safe method?
What do you think?
Thank's dennis
Hi
I have a jsp application.
In this program, each user may make simultaneous purchases.
So I need a way to store several itens.
I chose to use a Vector, but I read that's better to use ArrayList, because it's faster than Vector.
In this situation, what should I use?
Thank's dennis
I have other question.
In my jsp files I use the session object to store variables.
When I set to null the session or other value, the variable stored lost the reference? And the variable is able to be collected by gc?
Thank's dennis michel
When I declared a variable in a jsp file and I was redirected to another page, the variable lost the reference?
I have an Vector of String Arrays and set null to it.
In this case the arrays will be collected by gc?
Thank's dennis michel.
Hi
I have a jsp based application.
I'd like to know if it's good practice to set all variables to null, after using. I read that it helps the garbage collector to determine unused variables.
I have several variables such as String, arrays, vectors and arraylists.
I set to null only the vectors...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.