Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 94821 invoked from network); 5 Jul 2006 16:53:03 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 5 Jul 2006 16:53:03 -0000 Received: (qmail 26323 invoked by uid 500); 5 Jul 2006 16:52:51 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 26300 invoked by uid 500); 5 Jul 2006 16:52:51 -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 26285 invoked by uid 99); 5 Jul 2006 16:52:51 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 Jul 2006 09:52:51 -0700 X-ASF-Spam-Status: No, hits=1.4 required=10.0 tests=DNS_FROM_RFC_ABUSE,DNS_FROM_RFC_WHOIS,HTML_MESSAGE X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [66.163.179.117] (HELO web35408.mail.mud.yahoo.com) (66.163.179.117) by apache.org (qpsmtpd/0.29) with SMTP; Wed, 05 Jul 2006 09:52:50 -0700 Received: (qmail 45134 invoked by uid 60001); 5 Jul 2006 16:52:28 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=rzUkBEBfpS0ryhZwwXVvTKpY96dKwf3tZYFlOH+tHiJbIYYyK/gA+58WRbLqEWWqTrtL102paUhr5w/sNMkj7ry1/VeNl3VutTOYonZ86+keSwSUkuxoSIxTNJBtA+L3jVPYtcQxBfGC//vzEv9rjmXlHdVSwbFD+XuUedUnygI= ; Message-ID: <20060705165228.45132.qmail@web35408.mail.mud.yahoo.com> Received: from [198.60.24.129] by web35408.mail.mud.yahoo.com via HTTP; Wed, 05 Jul 2006 09:52:28 PDT Date: Wed, 5 Jul 2006 09:52:28 -0700 (PDT) From: Alec Swan Subject: Re: Serving CSS files from a certain URL To: Tomcat Users List In-Reply-To: <4eedb92a0607050938g73c23251l43086e37e557c7d0@mail.gmail.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-988555657-1152118348=:43079" Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N --0-988555657-1152118348=:43079 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit You are right, the problem is with the way JSPs are deployed. I do use the first servlet-mapping pattern, which does NOT match the full path, but rather the context path /testapp. I like your idea of using filters to rewrite CSS paths. Could you give me a hint on how to do that best? Thanks. Hassan Schroeder wrote: On 7/5/06, Alec Swan wrote: > In any case I don't understand why this works in your case. Now that I have more coffee in me, me neither :-) It really shouldn't, and I'm at another location now, so I can't revisit that, but... The problem is that "relative" to the container depends on how your JSP is being invoked; consider: Test /WEB-INF/jsp/Test.jsp Test /test Test /foo/bar/test The second mapping will work with your ../../css/Styles.css link, the first will not. > BTW, why do you think it's a bad idea to keep web designers focused on the look and feel of the site and releaving them from the deployment details? OT to the list -- but I think a development team should work within a common (consistent) environment. Otherwise you wind up jumping through the kind of hoops we're discussing now. :-) In any case, if I *had* to solve this problem, I'd use the relative links that work for your 'static' situation, and then either 1) serve all *.css files with a servlet that "fixes" the paths or 2) rewrite the css file paths with a Filter HTH, -- Hassan Schroeder ------------------------ hassan.schroeder@gmail.com --------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org --0-988555657-1152118348=:43079--