Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 99246 invoked from network); 9 Nov 2010 17:14:58 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 9 Nov 2010 17:14:58 -0000 Received: (qmail 88824 invoked by uid 500); 9 Nov 2010 17:15:23 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 88772 invoked by uid 500); 9 Nov 2010 17:15:22 -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 88763 invoked by uid 99); 9 Nov 2010 17:15:22 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 Nov 2010 17:15:22 +0000 X-ASF-Spam-Status: No, hits=-2.3 required=10.0 tests=RCVD_IN_DNSWL_MED,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [85.158.139.3] (HELO mail90.messagelabs.com) (85.158.139.3) by apache.org (qpsmtpd/0.29) with SMTP; Tue, 09 Nov 2010 17:15:14 +0000 X-VirusChecked: Checked X-Env-Sender: Rob.Gregory@ibsolutions.com X-Msg-Ref: server-7.tower-90.messagelabs.com!1289322885!10593671!11 X-StarScan-Version: 6.2.9; banners=-,-,- X-Originating-IP: [194.169.24.99] Received: (qmail 4675 invoked from network); 9 Nov 2010 17:14:52 -0000 Received: from unknown (HELO UKEXCHANGE1.Europe.iSOFTGroup.co.uk) (194.169.24.99) by server-7.tower-90.messagelabs.com with SMTP; 9 Nov 2010 17:14:52 -0000 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Subject: RE: Single webapp multiple contexts Date: Tue, 9 Nov 2010 17:10:40 -0000 Message-ID: <6D8F0A4A19FB2A49815191AC1C2B128E09E12E3A@UKEXCHANGE1.Europe.iSOFTGroup.co.uk> In-Reply-To: <6D8F0A4A19FB2A49815191AC1C2B128E09E12E0F@UKEXCHANGE1.Europe.iSOFTGroup.co.uk> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Single webapp multiple contexts Thread-Index: AcuAKkfFt+A78rdzS3Cq/JZyT6C5igAAkzFAAAECRAA= References: <6D8F0A4A19FB2A49815191AC1C2B128E09E12DEE@UKEXCHANGE1.Europe.iSOFTGroup.co.uk> <6D8F0A4A19FB2A49815191AC1C2B128E09E12E0F@UKEXCHANGE1.Europe.iSOFTGroup.co.uk> From: "Rob Gregory" To: "Tomcat Users List" The following entries are within the Changelog so it looks like what I am trying to do is now invalid? Can anyone suggest an alternative way to achieve the same result of a single code base with multiple contexts? Change Logs:- Make context deployment error message for fixDocBase() more meaningful. (markt) 38570: When checking docBase against appBase, make sure we check for an exact match against the appBase. (markt) =20 39013: When testing for invalid docBase, test for an exact match with the appBase dir. (markt) =20 42678: Only ignore docBase if it really is a subdir of appBase. Patch provided by juergen. (markt) > -----Original Message----- > From: Rob Gregory [mailto:Rob.Gregory@ibsolutions.com] > Sent: 09 November 2010 16:44 > To: Tomcat Users List > Subject: RE: Single webapp multiple contexts >=20 > Just to expand on this a little. I have previously had something working > but that was on Tomcat 5.5.9, The same trick no longer seems to work > under 6.0.29. >=20 > I basically created a context like >=20 > path=3D"/B" > docBase=3D"${catalina.home}/webapps/myapp" /> >=20 > which used an already deployed copy of our webapp. This did work under > 5.5.9 but fails with the following error under 6.0.29. Has this > functionality changed and if so is this sort of trick not a good idea? >=20 > INFO: Deploying configuration descriptor A.xml > 09-Nov-2010 16:37:21 org.apache.catalina.startup.HostConfig > deployDescriptor > WARNING: A docBase C:\intweb\0600\webapps\myapp inside the host appBase > has be > en specified, and will be ignored > 09-Nov-2010 16:37:21 org.apache.catalina.core.StandardContext > resourcesStart > SEVERE: Error starting static Resources > java.lang.IllegalArgumentException: Document base > C:\intweb\0600\webapps\A does > not exist or is not a readable directory > at > org.apache.naming.resources.FileDirContext.setDocBase(FileDirContext. > java:142) > at > org.apache.catalina.core.StandardContext.resourcesStart(StandardConte > xt.java:4249) > at > org.apache.catalina.core.StandardContext.start(StandardContext.java:4 > 418) > at > org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase > .java:791) > at > org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:77 > 1) > at > org.apache.catalina.core.StandardHost.addChild(StandardHost.java:546) >=20 > at > org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.ja > va:637) > at > org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.j > ava:563) > at > org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:498 > ) > at > org.apache.catalina.startup.HostConfig.start(HostConfig.java:1277) > at > org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java > :321) > at > org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(Lifecycl > eSupport.java:119) > at > org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053) >=20 > at > org.apache.catalina.core.StandardHost.start(StandardHost.java:785) > at > org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) >=20 > at > org.apache.catalina.core.StandardEngine.start(StandardEngine.java:445 > ) > at > org.apache.catalina.core.StandardService.start(StandardService.java:5 > 19) > at > org.apache.catalina.core.StandardServer.start(StandardServer.java:710 > ) > at org.apache.catalina.startup.Catalina.start(Catalina.java:581) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl. > java:39) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces > sorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:597) > at > org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289) > at > org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414) > 09-Nov-2010 16:37:21 org.apache.catalina.core.StandardContext start > SEVERE: Error in resourceStart() > 09-Nov-2010 16:37:21 org.apache.catalina.core.StandardContext start > SEVERE: Error getConfigured > 09-Nov-2010 16:37:21 org.apache.catalina.core.StandardContext start > SEVERE: Context [/A] startup failed due to previous errors >=20 > Thanks > Rob >=20 >=20 > > From: Rob Gregory [mailto:Rob.Gregory@ibsolutions.com] > > Sent: 09 November 2010 16:22 > > To: Tomcat Users List > > Subject: Single webapp multiple contexts > > > > Hello Tomcat Users, > > > > > > > > I am trying to create multiple 'dynamic' contexts using just a single > > code base. For example we currently deploy a webapps within a context > of > > let's say 'A'. This listens quite happily for requests coming in the > > form of http://localhost/A/index.htm. What I need to be able to do is > > have this same code base also listen for requests in the form of > > http://localhost/B/index.htm. I have played with using 'fake' > > context.xml e.g. > > > > > > > > A.xml =3D > path=3D"/A" /> > > > > B.xml =3D > path=3D"/B" /> > > > > > > > > This seems to work but the war is expanded into both contexts and what > I > > really need is a single code base preferably without the requirement > of > > using a .war file. I have looked at virtual hosts but this seems to > > involve changing the host name which is also not what I am trying to > > achieve. > > > > > > > > Using Tomcat 6.0.29 under Java(TM) SE Runtime Environment (build > > 1.6.0_14-b08). CATALINA_HOME is C:/0600. > > > > > > > > Can anyone give me a gentle push in the right direction if this is at > > all possible. > > > > > > > > Thanks in advance. > > > > > > > > Rob > > > > > > > > >=20 >=20 > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org > For additional commands, e-mail: users-help@tomcat.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org