From users-return-233610-apmail-tomcat-users-archive=tomcat.apache.org@tomcat.apache.org Tue Apr 17 20:49:37 2012 Return-Path: X-Original-To: apmail-tomcat-users-archive@www.apache.org Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 970EC9E08 for ; Tue, 17 Apr 2012 20:49:37 +0000 (UTC) Received: (qmail 37353 invoked by uid 500); 17 Apr 2012 20:49:34 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 37163 invoked by uid 500); 17 Apr 2012 20:49:34 -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 37154 invoked by uid 99); 17 Apr 2012 20:49:34 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 17 Apr 2012 20:49:34 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of knst.kolinko@gmail.com designates 209.85.161.173 as permitted sender) Received: from [209.85.161.173] (HELO mail-gx0-f173.google.com) (209.85.161.173) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 17 Apr 2012 20:49:28 +0000 Received: by ggnp2 with SMTP id p2so4184329ggn.18 for ; Tue, 17 Apr 2012 13:49:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; bh=ULC0zzbKHvFnngKkusluCwuhDvjNysFmwNT5M/jkaNk=; b=ZMRi4vV5LjrzfQupHGB2EZvsgIEAX0KxcZRalno7lphF0kfbHn8mIEqvg7gHX/AExX ujBgfx58iIHJtqxLKGaC+kcoW0w2mOLpsG2YscLcrjhPyiEdB5zRC7PVPNL/rFxFLtU0 1+UK38OKyIlMJHMGGnOfXtu5lgdjc5lC7/V+8EbLzntD4/c24tDHl7dCMd4ymOgBp8S7 LqGi+V+BIowiGo2HCbTcTXdwBe+n7PLpsmMOFNsIwC94eUWmZjPbv15drBCzZ0g0FAab ntIl/coG+E+U2cJqYTA6TgQ/I5rTjG3C9El5hR+FmzAs1HAqHPZSiqRqq7USatd73t9V g+7g== MIME-Version: 1.0 Received: by 10.236.187.38 with SMTP id x26mr7095170yhm.109.1334695747854; Tue, 17 Apr 2012 13:49:07 -0700 (PDT) Received: by 10.146.204.18 with HTTP; Tue, 17 Apr 2012 13:49:07 -0700 (PDT) In-Reply-To: <4F8DD476.2090202@kantl.be> References: <4F8D6122.40609@kantl.be> <4F8DD476.2090202@kantl.be> Date: Wed, 18 Apr 2012 00:49:07 +0400 Message-ID: Subject: Re: adding a global URI prefix for Tomcat web apps From: Konstantin Kolinko To: Tomcat Users List Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org 2012/4/18 ron.vandenbranden@home : > Hi Konstantin, > > Many thanks for your excellent suggestion. Sorry, I forgot to mention tha= t > I'm running Tomcat-7.0.27, so that should work. > > > On 17/04/2012 17:27, Konstantin Kolinko wrote: >> >> I would not comment on the Apache HTTP server configuration. Just on >> the quoted part above. You have not told us what Tomcat version you >> are using, but in current Tomcat 6 and 7 you can add "apps#" prefix to >> the subdirectory and war file names in webapps directory and it will >> add "apps/" to their URL, e.g.: >> >> =A0mv =A0webapps/my_app =A0webapps/apps#my_app >> >> A war file name would be "apps#my_app.war" See "Context" page in >> "Configuration Reference Guide" for more details. >> > > Nice! In my tests this works for some web apps, but apparently, some (usi= ng > cocoon-2.1.11) have problems. Any request for cococoon-2.1.11-based web a= pps > return errors about files that are not found. For example, suppose my app= is > located at F:\tomcat\webapps\apps#my_app, requests for > http://localhost:8080/apps/my_app/ return errors such as: > > =A0 =A0Message: F:\tomcat\webapps\stylesheets\system\exception2html.xslt = (The > system cannot find the path specified) > =A0 =A0Description: org.apache.cocoon.ProcessingException: Unable to get > transformer handler for > file:///F:/tomcat/webapps/stylesheets/system/exception2html.xslt > at =A0- > file:///F:/tomcat/webapps/apps#my_app/sitemap.xmap:922:53 at > =A0- file:///F:/tomcat/webapps/apps#my_app/sitemap.xmap:917:79 at type=3D"exception"> =A0- > file:///F:/tomcat/webapps/apps#my_app/sitemap.xmap:916:51 > =A0 =A0Sender: org.apache.cocoon.servlet.CocoonServlet > =A0 =A0Source: Cocoon Servlet > =A0 =A0cause > =A0 =A0 =A0java.io.FileNotFoundException: > F:\tomcat\webapps\stylesheets\system\exception2html.xslt (The system cann= ot > find the path specified) > > Does this imply that this 'hash' prefix is still experimental, depending = on > the web app? No. It is Cocoon that is broken. There is File -> URL conversion somewhere that does not encode characters properly, and '#' should be %-encoded if it is in an URL. Last time it was discussed on this list was several years ago. Either it is a rare use case, or it is just already fixed. http://tomcat.markmail.org/thread/5ixxlkiyfsou63vh http://tomcat.markmail.org/thread/ygac3etewhtpmf2p http://tomcat.markmail.org/message/oolap6mmrs22f5wr Best regards, Konstantin Kolinko --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org