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 <[EMAIL PROTECTED]>:
Daniel Chacón Sánchez wrote: > son = some :P > > 2006/9/25, Daniel Chacón Sánchez <[EMAIL PROTECTED]>: >> >> 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]