tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nicolas PERIDONT" <nperid...@free.fr>
Subject Principal Cast Exception
Date Sat, 02 Feb 2002 15:51:50 GMT
Hi,

I have make my own Principal class name MyPrincipal that extends from
java.scurity.Principal
I make my own Realm and i can log with it.
But when i get the Principal object whith the request.getUserPrincipal()
method i cant cast this object in (MyPrincipal).
I get a classCastException when i try to to this
(MyPrincipal)request.getUserPrincipal().
But the most strange is that i get a MyPrincipal response when i try a
request.getUserPrincipal().getclass().getName().

Have some idea why i can't make a cast on it ?
Does it come from the diference of classLoader between the JSP environement
and the Server environement ?

Thanks in advance for your help

Nicolas PERIDONT


--
To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>


Mime
View raw message