Return-Path: Delivered-To: apmail-jakarta-tomcat-user-archive@www.apache.org Received: (qmail 11503 invoked from network); 12 Nov 2003 21:17:18 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 12 Nov 2003 21:17:18 -0000 Received: (qmail 84619 invoked by uid 500); 12 Nov 2003 21:16:47 -0000 Delivered-To: apmail-jakarta-tomcat-user-archive@jakarta.apache.org Received: (qmail 84470 invoked by uid 500); 12 Nov 2003 21:16:46 -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 84457 invoked from network); 12 Nov 2003 21:16:46 -0000 Received: from unknown (HELO mwinf0602.wanadoo.fr) (193.252.22.25) by daedalus.apache.org with SMTP; 12 Nov 2003 21:16:46 -0000 Received: from apollo (ASt-Lambert-111-1-4-62.w81-48.abo.wanadoo.fr [81.48.96.62]) by mwinf0602.wanadoo.fr (SMTP Server) with SMTP id 0C9DC54007DE; Wed, 12 Nov 2003 22:16:48 +0100 (CET) From: "Xavier Deheul" To: Subject: getUserPrincipal and custom realm Date: Wed, 12 Nov 2003 22:29:35 +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.2911.0) Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4807.1700 X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N I wrote my custom Realm for a form-based-authentication and everything is successfull (I declare the realm in my context in the server.xml file, I gives the mbean descriptor and the librairies file to the server) However I still have a last problem after the user-form authentication when I call the request.getUserPrincipal. When I cast the class to my principal, there is a jasperException : request.getPrincipal().getClass().getName() = com.website.security.UserPrincipal request.getPrincipal() instance of com.website.security.UserPrincipal = false UserPrincipal princ=(UserPrincipal)request.getUserPrincipal() = org.apache.jasper.JasperException: at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2 54) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) ... I think that there is perhaps a conflict between my WEB-INF/classes files and the $TOMCAT/server/lib librairies (which are the same classes). How can I solve this problem ? Can I redefine the getUserPrincipal ? (with caucho resin the authenticator class is called to answer) Could you help me ? Thanks a lot PS : I have also a little question : Why must I declare the jar librairies in the server lib directory if the authentication is only for my context ? For example with caucho resin the server looks for the authenticator classes only into the WEB-INF/lib directory. --------------------------------------------------------------------- To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: tomcat-user-help@jakarta.apache.org