Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 7503 invoked from network); 9 Dec 2009 21:07:51 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 9 Dec 2009 21:07:51 -0000 Received: (qmail 10809 invoked by uid 500); 9 Dec 2009 21:07:47 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 10744 invoked by uid 500); 9 Dec 2009 21:07:47 -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 10733 invoked by uid 99); 9 Dec 2009 21:07:47 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 09 Dec 2009 21:07:47 +0000 X-ASF-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of anthonyjay@fastmail.fm designates 66.111.4.25 as permitted sender) Received: from [66.111.4.25] (HELO out1.smtp.messagingengine.com) (66.111.4.25) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 09 Dec 2009 21:07:42 +0000 Received: from compute1.internal (compute1.internal [10.202.2.41]) by gateway1.messagingengine.com (Postfix) with ESMTP id 44A7CC5F51 for ; Wed, 9 Dec 2009 16:07:21 -0500 (EST) Received: from web7.messagingengine.com ([10.202.2.216]) by compute1.internal (MEProxy); Wed, 09 Dec 2009 16:07:21 -0500 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=messagingengine.com; h=message-id:from:to:mime-version:content-transfer-encoding:content-type:subject:date; s=smtpout; bh=qoOW9RNV8cobliesCKz3aUH9f/c=; b=oqvosTVgAVqI4756Dx33TfB48Zvf695k51w714NUxhS/Pid61tz7v02kmk0DEeKldJvMLclZh0JGqTTruQ1cjbsjt9EJQBvmapDGKBv0PTvffE0tltU5SYKG4agvnWcxnral5AeBo1tqkBofwivGbMLysMOqmm6cbOH5OVJduKs= Received: by web7.messagingengine.com (Postfix, from userid 99) id 24588909C0; Wed, 9 Dec 2009 16:07:21 -0500 (EST) Message-Id: <1260392841.4356.1349307391@webmail.messagingengine.com> X-Sasl-Enc: b90P5nItxkrXk7rwJJ1vXypiOzKXqGMO1MXixL8e5aDd 1260392841 From: "Anthony Jay" To: "Tomcat Users List" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii" X-Mailer: MessagingEngine.com Webmail Interface Subject: Contexts and Path and Authentication Date: Wed, 09 Dec 2009 21:07:21 +0000 Hi All, I am having tremendous difficulty configuring contexts on tomcat. I've had to split my perfectly working application into two applications as the jsp now requires Form based authentication and the XML components require Http Basic authentication as before. As I've learned the very hard way I cannot do both within the same application without writing my own security plumbing. So I've taken peoples advice and made one war file formauth.war with all jsp and related servlets which uses form based auth and also created basicauth.war which contains all xml servlet configuration, I put the common libs into tomcat/lib directory (to handle Statics and singletons and DB stuff) Two apps, two authentication mechanisms. Messy but I could see no other way. My jsps etc are contained on the path /secure/xxx and /secure/yyy as well as /public/* But my XML URL pattern for servlets is /secure/xml/* and /xml/* which are declared in web.xml Individually each war when deployed seem to work fine except for the uri/path configuration. i.e. URL prepended with /formauth/ or /basicauth/ prefixes. Currently this works: /formauth/secure/yyy -->Form based auth /formauth/secure/xxx -->Form based auth /formauth/public/ -->Form based auth /basicauth/secure/xml/ -->basic auth /basicauth/xml/ -->basic auth etc. Which is not what I want, the application must work as before. /secure/yyy -->Form based auth /secure/xxx -->Form based auth /public/ -->Form based auth /secure/xml/ -->basic auth /xml/ -->basic auth I need to remove the /formauth/ and /basicauth/ directories and my pain will subside. From everything that I have read this SHOULD be possible when configuring the context element. My issue now is that trying to overlap the contexts will not work for me. I can only get one war to work at at time (as default context) using Server.xml when war is deployed in the webapps folder. I have tried and many different combinations but I can never remove the /formauth/ or /basicauth/ prefixes except when one is set as default, but then I cannot configure the other context. A little advice here should go a long way as I've read http://tomcat.apache.org/tomcat-6.0-doc/config/context.html and related pages and posts about a fifty times as well as sample setups. I'm really pulling my hair out now.....this is taking me waaaaaay too long. There are many brownie points going for this one. Tony --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org