You might even have the problem that you have a session scoped form bean 
(possible with many nested beans inside) and you want to kill all nested beans 
except a few ones.
In this case the following steps might help.

1.) Instantiate a new instance of your form bean.
2.) Copy all properties, nestet beans you want to preserve from the original 
bean to your new bean (using PropertyUtils form commons-beanutils)
3.) Copy all properties (including ones with null values) from your new bean 
back to the original form bean.

Bjoern  

> -----Ursprüngliche Nachricht-----
> Von: Daniel Chacón Sánchez [mailto:[EMAIL PROTECTED] 
> Gesendet: Montag, 25. September 2006 23:07
> An: Struts Users Mailing List
> Betreff: Erase Only some Session Objests and variables
> 
> 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
> 

Diese E-Mail enthaelt vertrauliche und/oder rechtlich geschuetzte Informationen.
Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtuemlich 
erhalten haben, 
informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. 
Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail bzw. Inhalte 
hieraus ist nicht gestattet.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to