tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dennis Meerveld <dennis.meerv...@cognicase.nl>
Subject RE: unsetting bean w/ session scope
Date Mon, 02 Apr 2001 06:47:37 GMT
what about creating a instance of the class of the bean.

so st like : Name tempClass = new Name();
then call all the setters on the existing bean with the getters on the bean.

name.setXXX(tempClass.getXXX());
...
and so on..

afterwards set tempClass back to null : tempClass=null, so it can be gc-ed.

better write a globalset/get for your class, then you can use :

name.setAll(tempClass.getAll());

hope this helps

greetz

Dennis



-----Original Message-----
From: Kris Gonzalez [mailto:jimjamjoh@softhome.net]
Sent: Monday, April 02, 2001 8:22 AM
To: tomcat-user@jakarta.apache.org
Subject: unsetting bean w/ session scope


i use a bean with session scope in all of my JSPs in a particular app
i'm working on by using the following:

<jsp:useBean id="name" class="Name" scope="session"/>

however, i've need to reset this particular bean at some point...i tried
this by running the following:

name = new Name();

this did not work...is there any workaround to restore a bean w/ session
scope back to it's original state?

thanks!

Mime
View raw message