Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 54296 invoked from network); 23 Sep 2007 17:02:49 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 23 Sep 2007 17:02:49 -0000 Received: (qmail 9821 invoked by uid 500); 23 Sep 2007 17:02:28 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 9803 invoked by uid 500); 23 Sep 2007 17:02:28 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 9792 invoked by uid 99); 23 Sep 2007 17:02:28 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 23 Sep 2007 10:02:28 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of lists@nabble.com designates 216.139.236.158 as permitted sender) Received: from [216.139.236.158] (HELO kuber.nabble.com) (216.139.236.158) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 23 Sep 2007 17:04:36 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1IZUqL-0007aM-KZ for users@tomcat.apache.org; Sun, 23 Sep 2007 10:02:05 -0700 Message-ID: <12848283.post@talk.nabble.com> Date: Sun, 23 Sep 2007 10:02:05 -0700 (PDT) From: A Sunley To: users@tomcat.apache.org Subject: Single Sign-On across multiple webapps MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Nabble-From: alan.sunley@gmail.com X-Virus-Checked: Checked by ClamAV on apache.org Greeting Tomcat gurus, I'm experiencing some problems implementing SSO across two webapps. Basically we have a main website which presently uses FORM authentication with a JAASRealm =E2=80=93 this works fine for the website. However we now = want to add a forum, specifically JForum ( www.jforum.net ) as it supports SSO. Ideally we want to install it as a separate webapp. By default JForum supports SSO by calling request.getRemoteUser(). But if the user is authenticated in the first webapp. For the main website we have context.xml in website/META-INF/, with crossContext enabled and the JAASRealm specified. A quick note about the JAAS setup, I don't know whether this has any implications regarding SSO -= =20 The JAASRealm has useContextClassLoader set to false, therefore the LoginModule is a class of the website, not a .jar in the Tomcat shared library. With crossContext enabled in the main webapp, calling getRemoteUser() in th= e jforum webapp returns null and I'm not sure why.=20 Essentially my question is how do I enable cross-context sessions? Indeed, if I set a session attribute in one webapp, how do I access it in from another webapp period?=20 Is this the way to do it: Set attribute in webapp1: request.getSession().getServletContext().getContext("/webapp2").setAttribut= e("test", "Hello");=20 Access attribute in webapp2: request.getSession().getServletContext().getContext("/webapp2").getAttribut= e("test"); Thanks for your time. Alan. --=20 View this message in context: http://www.nabble.com/Single-Sign-On-across-m= ultiple-webapps-tf4505100.html#a12848283 Sent from the Tomcat - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org