that's exaclty what happened. I was importing  a wrong "User".
thank you.
Meissa



Dave Newton <[EMAIL PROTECTED]> 
20/09/2007 13:47
Veuillez répondre à
"Struts Users Mailing List" <user@struts.apache.org>


A
Struts Users Mailing List <user@struts.apache.org>
cc

Objet
Re: can't cast an object back from session






--- [EMAIL PROTECTED] wrote:
> Yes, when I try casting it like you this,
>  User
user=(User)getSession().get(Constantes.USER_SESSION_KEY);
> I'm getting a ClassCastException.

Make sure you're importing the correct "User" class;
if the User class in session is the correct type then
it's essentially impossible to get a class cast
exception unless the User class on the left-hand side
is the wrong type.

d.


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




L'integrite de ce message n'etant pas assuree sur internet, Natixis ne peut 
etre tenu responsable de son contenu. Toute utilisation ou diffusion non 
autorisee est interdite. Si vous n'etes pas destinataire de ce message, merci 
de le detruire et d'avertir l'expediteur.
Ensemble, faisons un geste pour l'environnement : n'imprimons nos mails que si 
necessaire

The integrity of this message cannot be guaranteed on the Internet. Natixis can 
not therefore be considered responsible for the contents. Any unauthorized use 
or dissemination is prohibited. If you are not the intended recipient of this 
message, then please delete it and notify the sender.
Let us mind the environment : let's print our mails only when necessary.

Reply via email to