Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 32598 invoked from network); 9 Mar 2011 17:54:29 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 9 Mar 2011 17:54:29 -0000 Received: (qmail 96787 invoked by uid 500); 9 Mar 2011 17:54:25 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 96601 invoked by uid 500); 9 Mar 2011 17:54:25 -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 96592 invoked by uid 99); 9 Mar 2011 17:54:25 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 09 Mar 2011 17:54:25 +0000 X-ASF-Spam-Status: No, hits=2.0 required=5.0 tests=RCVD_IN_BL_SPAMCOP_NET,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of aw@ice-sa.com designates 212.85.38.228 as permitted sender) Received: from [212.85.38.228] (HELO tor.combios.es) (212.85.38.228) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 09 Mar 2011 17:54:17 +0000 Received: from [10.41.49.135] (unknown [82.113.121.0]) by tor.combios.es (Postfix) with ESMTPA id 362A422614A for ; Wed, 9 Mar 2011 18:53:55 +0100 (CET) Message-ID: <4D77BEAC.9070109@ice-sa.com> Date: Wed, 09 Mar 2011 18:53:48 +0100 From: =?UTF-8?B?QW5kcsOpIFdhcm5pZXI=?= Reply-To: Tomcat Users List User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) MIME-Version: 1.0 To: Tomcat Users List Subject: Re: JSP pages are not loaded. Only HTML source code References: <4D764286.1080000@ice-sa.com> <4D777AD5.1050406@ice-sa.com> <4D77A47E.4020808@ice-sa.com> <4D77A7CB.8020805@apache.org> In-Reply-To: <4D77A7CB.8020805@apache.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Mark Thomas wrote: > On 09/03/2011 16:02, André Warnier wrote: >> Now from the train.. >> >> When you request a URL such as this from Tomcat : >> >> (http://hostname)/ABC/DEF/hij.jsp >> >> Tomcat uses the first component of the path (/ABC) as mapping for the >> "web application". >> It then passes the request to the application "ABC". > > Not strictly correct. > > Tomcat compares the URL to the list of context paths and the longest > match wins. > > In the example above the context path may be any of the following: > / > /ABC > /ABC/DEF > you simply can't tell from looking at the URL. You have to know what > context paths are currently configured. > That is certainly more correct than my simplified explanation, but,at this point, likely to confuse the OP a bit more, maybe ? Quoting selectively from Petr's previous posts : ... in the Catalina configuration directory (/etc/tomcat5/base/Catalina/localhost/XYtest.xml) is following context ... (now) Apache things are in directory /opt/test/htdocs tomcat things are in directory /opt/test/servlet (/etc/tomcat5/base/Catalina/localhost/)XYtest.xml is now: And jsp are stored in /opt/test/servlet/jsp/Viewer/View.jsp ... end quote and he didn't say -- but I presume --, that web.xml is in /opt/test/servlet/WEB-INF/web.xml So, Petr, to bring all this together : 1) in /etc/tomcat5/base/Catalina/localhost/XYtest.xml : docBase="/opt/test/servlet" 2) in the Apache config : ProxyPassMatch ^/XYtest/(.*\.jsp)$ ajp://localhost:8009/XYtest/$1 Because if you just use ProxyPass /XYtest ajp://localhost:8009/Xytest then a URL like "/XYtest/index.html" will also be passed to Tomcat, and Tomcat will not find it, considering the location of your "Apache things" above. 3) in the file index.html :