From tomcat-user-return-9817-qmlist-jakarta-archive-tomcat-user=jakarta.apache.org@jakarta.apache.org Tue Feb 05 08:17:14 2002 Return-Path: Delivered-To: apmail-jakarta-tomcat-user-archive@apache.org Received: (qmail 5542 invoked from network); 5 Feb 2002 08:17:14 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 5 Feb 2002 08:17:14 -0000 Received: (qmail 16961 invoked by uid 97); 5 Feb 2002 08:17:04 -0000 Delivered-To: qmlist-jakarta-archive-tomcat-user@jakarta.apache.org Received: (qmail 16945 invoked by uid 97); 5 Feb 2002 08:17:04 -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 16934 invoked from network); 5 Feb 2002 08:17:03 -0000 Message-ID: From: "Loo, Jason" To: "'tomcat-user@jakarta.apache.org'" Subject: Custom Authentication/User Principal Date: Tue, 5 Feb 2002 00:16:37 -0800 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C1AE1D.6E9E7E90" X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N ------_=_NextPart_001_01C1AE1D.6E9E7E90 Content-Type: text/plain I've been successful in creating a custom JDBCRealm and have extended the GenericPrincipal. However, when attempting to pull my principal from the request (request.getUserPrincipal()) and cast to EITHER org.apache.catalina.realm.GenericPrincipal or my custom principal, I get a Class Cast Exception. I've browsed through the archives for a solution and the closest I've found has been the one located at the following URL: http://www.mail-archive.com/tomcat-user@jakarta.apache.org/msg40073.html However, the solution seems a bit nastly. Does anyone know of other options aside from copying classes to multiple paths or overriding the Catalina classpath?? Many thanks. ------_=_NextPart_001_01C1AE1D.6E9E7E90--