Return-Path: Delivered-To: apmail-incubator-jspwiki-user-archive@locus.apache.org Received: (qmail 25105 invoked from network); 4 Dec 2008 22:19:41 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 4 Dec 2008 22:19:41 -0000 Received: (qmail 78077 invoked by uid 500); 4 Dec 2008 22:19:53 -0000 Delivered-To: apmail-incubator-jspwiki-user-archive@incubator.apache.org Received: (qmail 78066 invoked by uid 500); 4 Dec 2008 22:19:53 -0000 Mailing-List: contact jspwiki-user-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: jspwiki-user@incubator.apache.org Delivered-To: mailing list jspwiki-user@incubator.apache.org Received: (qmail 78055 invoked by uid 99); 4 Dec 2008 22:19:53 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 04 Dec 2008 14:19:53 -0800 X-ASF-Spam-Status: No, hits=0.7 required=10.0 tests=SPF_HELO_PASS,SPF_SOFTFAIL X-Spam-Check-By: apache.org Received-SPF: softfail (athena.apache.org: transitioning domain of brian@pingtoo.com does not designate 217.154.193.216 as permitted sender) Received: from [217.154.193.216] (HELO mail2.pingtoo.com) (217.154.193.216) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 04 Dec 2008 22:18:24 +0000 Received: from [10.1.252.200] (schizo.pingtoo.com [10.1.252.200]) by mail.pingtoo.com (Postfix) with ESMTPA id 376458BCFF4 for ; Thu, 4 Dec 2008 22:20:13 +0000 (GMT) Message-ID: <4938573C.5050607@PingToo.com> Date: Thu, 04 Dec 2008 22:18:36 +0000 From: Brian Burch User-Agent: Thunderbird 2.0.0.18 (X11/20081125) MIME-Version: 1.0 To: jspWiki users Subject: Displaying images outside the webapp container Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org I am running jspWiki 2.8.1 under tomcat 5.5.27, on an ubuntu linux system. I have successfully used the ImpagePlugin and SlideShowPlugin to display digital photos WITHIN the webapp directory path. I think I understand how they generate inline url's within the web page, so that the browser issues an HTTP GET for the individual image files. This means that tomcat, not jspWiki, will be responsible for delivering the individual image files. I have LOADS of photo's in a directory hierarchy which is outside the tomcat directory structure. I don't want to move this huge hierarchy inside the jspWiki container because it simply isn't the right place for it. I've created a symlink for the root of my photos directory, e.g. ln -s /real/path/to/my/photos/ /tomcat-home/webapps/wiki/files/photos My photos can be found with system commands, e.g. both ls -l /real/path/to/my/photos/2008/November/DSCF0123.JPG ls -l /tomcat-home/webapps/wiki/files/photos/2008/November/DSCF0123.JPG work fine. However, when my wiki page uses either plugin with src='files/photos/2008/November/DSCF0123.JPG, the image file is not displayed. When I view the page source, the url for the src url appears to be fine. This a known tomcat issue - that it will not follow a symlinked directory by default. http://tomcat.apache.org/tomcat-5.5-doc/config/context.html says to define a context.xml in the webapp META-INF directory. Mine simply contains , because the documentation recommends NOT specifying docBase. The tomcat log says: INFO: default: DefaultServlet.serveResource: Serving resource '/files/pictures/2008/11-lateAutumn/DSCF2686.JPG' headers and data This looks suspicious to me - the url has a leading slash, rather than relative to the webapp docBase, and tomcat doesn't serve up the image file! Presumably, I've missed an important detail. Any quick words of wisdom would be appreciated. Brian