Return-Path: Delivered-To: apmail-jakarta-tomcat-user-archive@apache.org Received: (qmail 30073 invoked from network); 2 Feb 2002 15:52:39 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 2 Feb 2002 15:52:39 -0000 Received: (qmail 10105 invoked by uid 97); 2 Feb 2002 15:52:20 -0000 Delivered-To: qmlist-jakarta-archive-tomcat-user@jakarta.apache.org Received: (qmail 10088 invoked by uid 97); 2 Feb 2002 15:52:19 -0000 Mailing-List: contact tomcat-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Tomcat Users List" Reply-To: "Tomcat Users List" Delivered-To: mailing list tomcat-user@jakarta.apache.org Received: (qmail 10077 invoked from network); 2 Feb 2002 15:52:18 -0000 From: "Nicolas PERIDONT" To: "Tomcat-User" Subject: Principal Cast Exception Date: Sat, 2 Feb 2002 16:51:50 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N 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: For additional commands: Troubles with the list: