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 C26BBD70A for ; Sun, 2 Dec 2012 10:55:17 +0000 (UTC) Received: (qmail 81856 invoked by uid 500); 2 Dec 2012 10:55:14 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 81609 invoked by uid 500); 2 Dec 2012 10:55:13 -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 81560 invoked by uid 99); 2 Dec 2012 10:55:12 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 02 Dec 2012 10:55:12 +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.220.173 as permitted sender) Received: from [209.85.220.173] (HELO mail-vc0-f173.google.com) (209.85.220.173) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 02 Dec 2012 10:55:07 +0000 Received: by mail-vc0-f173.google.com with SMTP id f13so1259763vcb.18 for ; Sun, 02 Dec 2012 02:54:46 -0800 (PST) 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; bh=mUf22/Lp1OM9KXLFknxtOotxtdEePekMbJcv3UATcsU=; b=OaBo6Y1zjHwfExClfjeeHTnbS7T4zv2EyKvveXGHEwObCUMMQY0lgAhTTDgR0FKE81 bIvzp8KaO02iCX/wfzXz+taxPtDsdbsqi31ElXF1UEo5T5ZGgkzRekwdGHIYF+x78EY0 so0yhaLq++gn8wsq/KOuN3N68wTmWCE3gk0zHIm9Lq5jqXl/GqrfZ2vzyPRMCWZgLhDz YDzbCkzjFOKk92C+oinu5jO5UcyerBFCmz9V1LT0HRSFOAWaknSHbRq3Uje+O6RMNa4a LFjBz/bJRjc8vq7a7OEaoMBr6SSYJB4Rosqy0gDEC8T8BdwMynAjAWktIJxEPWmjnJIu H3CQ== MIME-Version: 1.0 Received: by 10.220.154.148 with SMTP id o20mr5757328vcw.54.1354445686172; Sun, 02 Dec 2012 02:54:46 -0800 (PST) Received: by 10.58.249.199 with HTTP; Sun, 2 Dec 2012 02:54:45 -0800 (PST) In-Reply-To: <50B90E20.2000907@tmbsw.com> References: <99C8B2929B39C24493377AC7A121E21FC4947E68A3@USEA-EXCH8.na.uis.unisys.com> <50B90E20.2000907@tmbsw.com> Date: Sun, 2 Dec 2012 14:54:45 +0400 Message-ID: Subject: Re: Context Path for a subdirectory From: Konstantin Kolinko To: Tomcat Users List Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org 2012/11/30 Terence M. Bandoian : > Hi, Chuck- > > I don't mean to be argumentative but, with Tomcat 6.0.29, I found that > static files from an images subdirectory of a web application were not > cached by Internet Explorer 7. As a workaround, I created a context for the > images subdirectory and left it nested in the web application. The files > from that directory were then cached by IE7. The difference was that the > following response headers were included when there was no separate context > defined for the subdirectory: > > Pragma: No-cache > Cache-Control: no-cache > Expires: Wed, 31 Dec 1969 18:00:00 CST > > Something else I found unusual was that ETag and Last-Modified headers were > provided in both configurations. Apparently, some browsers (e.g. Firefox) > utilize that information even when the no-cache and Expires headers are > provided. > > I realize this is a non-standard configuration but it worked with 6.0.29 and > 6.0.35. > The "no-cache" headers are added to resources that are protected by a security constraint. That is for an obvious reason: if a resource is cached locally, you cannot protect it. It is usually a good idea to do not protect such static files. Regarding "a.war/foo/bar" vs "a#foo.war/bar", Tomcat always selects a webapp first - one that matches the longest path. Then it selects a resource in the selected webapp. It is mentioned in the Introduction section of the "config/context.html" page of the Configuration Reference Guide. One example of using this rule is ROOT/admin/index.html page in Tomcat 5.5. When a user requests "http://localhost:8080/admin/" and the admin webapp is not installed, the ROOT/admin/index.html page is called and says that "no such application is here". If the admin webapp is installed, then its welcome page (admin/index.jsp) is displayed. Best regards, Konstantin Kolinko --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org