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"
A
Struts Users Mailing List
cc
Objet
Re: can't cast an object back fro
--- [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
:36
Veuillez répondre à
"Struts Users Mailing List"
A
user@struts.apache.org
cc
Objet
Re: can't cast an object back from session
Did you try casting it directly, like:
User user=(User)getSession().get(Constantes.USER_SESSION_KEY);
?
If not, try logging (or debug to it)
Did you try casting it directly, like:
User user=(User)getSession().get(Constantes.USER_SESSION_KEY);
?
If not, try logging (or debug to it) the class name of the object you've
got:
getSession().getAttribute("aa").getClass().getCanonicalName() (or getName())
Loggers and debuggers are great fo
I'm troubleshooted with this starnge behaviour of the session.
I have implemented SessionAware and have defined a session attribute of
Map type with getter (and setter)
as indicated to handle session.
I'm putting a User objet to the session and want to retrieve it after some
steps.
The code bel
5 matches
Mail list logo