You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Kris Gonzalez <ji...@softhome.net> on 2001/04/02 08:22:20 UTC

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!


Re: unsetting bean w/ session scope

Posted by Kevin Sangeelee <ke...@susa.net>.
On Mon, 2 Apr 2001, Kris Gonzalez wrote:

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

name = new Name();
session.setAttribute("name",name);
----------------------------------
(assuming the session is an HttpSession object of course)