struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel Chacón Sánchez" <danielc...@gmail.com>
Subject Re: Erase Only some Session Objests and variables
Date Mon, 25 Sep 2006 22:41:37 GMT
What do you suggest me to use for keep that "preserve" names? A file, an
arrayList, or what? An example code of the use of that with the code that
Heidy gived??


2006/9/25, Jason King <jhking@airmail.net>:
>
> Daniel Chacón Sánchez wrote:
> > son = some :P
> >
> > 2006/9/25, Daniel Chacón Sánchez <danielccss@gmail.com>:
> >>
> >> Hi all,
> >>
> >> How I can kill son objects and variables in session, without kill
> >> everything in session like with session.invalidate().
> >>
> >> I want that some objects always be in session and when I press a menu
> >> option all other variables or object that are in session be erase.
> >>
> >> i can´t use removeAttribute(..); because I don´t know the name of all
> >> objects and variables that be in session in a moment. I need to erase
> >> everything from sesion except son object that always need in session,
> >> how
> >> can i do that?
> >>
> >> I'm using struts framework
> >>
> >
> Since the session object is a map you could get a list of keys and for
> each key compare it to your list of "preserve" names.  If its not in the
> name, remove it.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message