Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 97888 invoked from network); 29 Jul 2009 10:33:43 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 29 Jul 2009 10:33:43 -0000 Received: (qmail 18554 invoked by uid 500); 29 Jul 2009 10:33:40 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 18515 invoked by uid 500); 29 Jul 2009 10:33:40 -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 18504 invoked by uid 99); 29 Jul 2009 10:33:40 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 29 Jul 2009 10:33:40 +0000 X-ASF-Spam-Status: No, hits=-4.0 required=10.0 tests=RCVD_IN_DNSWL_MED,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of pflynn@ucc.ie designates 143.239.1.34 as permitted sender) Received: from [143.239.1.34] (HELO mail4.ucc.ie) (143.239.1.34) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 29 Jul 2009 10:33:29 +0000 Received: from [143.239.128.196] (ccepub196.ucc.ie [143.239.128.196]) by mail4.ucc.ie (8.13.8/8.13.8) with ESMTP id n6TAX2SE032730 for ; Wed, 29 Jul 2009 11:33:07 +0100 Message-ID: <4A70255E.9090700@ucc.ie> Date: Wed, 29 Jul 2009 11:33:02 +0100 From: Peter Flynn Organization: University College Cork User-Agent: Thunderbird 2.0.0.22 (X11/20090608) MIME-Version: 1.0 To: Tomcat Users List Subject: Re: Multiple applications References: <4A40E8A0.9070600@ucc.ie> <4eedb92a0906230805k39efcf36p4e13a604ad0f78da@mail.gmail.com> In-Reply-To: <4eedb92a0906230805k39efcf36p4e13a604ad0f78da@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-MD-NoSA: yes X-Scanned-By: MIMEDefang 2.57 on 143.239.1.34 X-Virus-Checked: Checked by ClamAV on apache.org Hassan Schroeder wrote: > On Tue, Jun 23, 2009 at 7:37 AM, Peter Flynn wrote: >> I've been using Tomcat5 with Apache2 under RH5 to run Cocoon, but I >> now need to add Lucene and eXist. Is it possible to run multiple >> applications like this on the same machine using the same Tomcat >> server? > > Yes. I only get a short time per month to look at this stuff so my apologies for not getting back sooner. >> At the moment, all Cocoon pages get an extra "cocoon/" token >> inserted in their URI, eg http://myhost.server.domain/cocoon/stuff. >> I did look at just replacing ROOT in webapps but that seems a >> little heavy-handed, > > Renaming a directory (or war file) is "heavy-handed"??? I would have thought so -- with an outsider's eyes. One doesn't normally want to mess with the default directory layout of installed software, only add to it and edit configs. I don't know what the default ROOT actually does. >> and it would seem to defeat any chance of adding Lucene and eXist. > > No it wouldn't. Excellent, thanks. > Look at the examples that come with the standard distro. It should be > apparent that (and how) multiple webapps are supported. ...and Caldarale, Charles R wrote: > Clearly you can - look how many independent webapps are deployed in > the standard Tomcat download. Unfortunately that is opaque to me. This is /var/lib/tomcat5 (under RHEL4): drwxr-x--- 5 root tomcat 4096 Feb 27 2008 balancer drwxr-xr-x 9 tomcat tomcat 4096 Apr 21 12:00 cocoon drwxrwxr-x 21 root tomcat 4096 Apr 7 2008 jsp-examples drwxrwxr-x 4 root tomcat 4096 Apr 7 2008 ROOT drwxrwxr-x 4 root tomcat 4096 Apr 7 2008 servlets-examples drwxrwxr-x 12 root tomcat 4096 Apr 7 2008 tomcat-docs drwxrwxr-x 3 root tomcat 4096 Apr 7 2008 webdav Apart from cocoon, which I added, I am not aware of what balancer is or what I might want it for. I can see examples, and tomcat-docs, and I know what webdav is (although I don't use it). But these look to me like utilities that come with Tomcat, rather than "apps". No matter, if apps they are, that's fine. Caldarale, Charles R wrote: > Replacing ROOT with your desired default webapp for the domain is not > heavy-handed, it's expected. Aha. > You can obviously only have one default webapp per ; other > webapps for the have to be explicitly named. Yes, but where does this explicit naming take place? server.xml? web.xml? I currently have a Host element type in server.xml naming the host (which is a cname; this is all front-ended by Apache with a VH): ... This is currently all working and http://publish.ucc.ie is correctly bringing up my Cocoon pages. [me] >> Is there another way to get rid of the "cocoon/", because the >> Cocoon pages will be the interface the user sees (but somehow >> preserve an equivalent "lucene/" and "eXist/" because they won't be >> seen much)? > > Rename your Cocoon webapp to ROOT (remove the old ROOT first), and > install your Lucene and eXist applications under whatever names you > choose under the appBase directory. Leave Lucene and eXist aside for the moment. I renamed ROOT to OLDROOT and renamed the cocoon directory to ROOT. Restarted tomcat and apache. But when I tried http://publish.ucc.ie I got a Tomcat 404 The requested resource (/cocoon) is not available. Somewhere it's not looking in the right place. What other changes are needed to make it pick up the app that is in the ROOT directory? (I've renamed them all back the way they were for the moment.) > You likely only have one , and if you haven't changed the > default appBase setting, it's the webapps directory. Exactly. > Your structure should look like this: > > ${CATALINA_BASE} > webapps > ROOT (containing your Cocoon webapp) > lucene (containing your Lucene webapp) > exist (containing your eXist webapp) Yes, although lucene and exist aren't there yet, and there is the other default stuff in webapps as shown in the listing above.) > The names are case-sensitive, so choose them carefully; they can be > anything you choose, other than ROOT. I'm still trying to get it to serve cocoon when I move the default ROOT out of the way and rename the cocoon directory to ROOT, but there is obviously some other key piece of information I am missing here. David Smith wrote: > You can name your cocoon webapp ROOT and then add lucene and eXist > webapps. If lucene or eXist webapps exist, the request will go to > them. It'll only hit ROOT if those webapps aren't there or running. > This falls under the requirement of servlet containers to make the > longest match at each stage of the decision making process. When > choosing which webapp, the longest match is used and then again at > the servlet mapping level, the longest match takes it. That makes sense, except that simply renaming cocoon to ROOT just gets me the 404 "requested resource (/cocoon) is not available" message. There must be some other change (to a config file?). The only changes I have made to the default config are to add the hostname to server.xml as above and comment out the servlet-mapping for Cocoon in web.xml (if it is left in, all requests to the server for cocoon pages get a 503 Service Temporarily Unavailable). I don't know why that should be. ///Peter --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org