Return-Path: Delivered-To: apmail-jackrabbit-users-archive@locus.apache.org Received: (qmail 51214 invoked from network); 28 Nov 2006 17:29:47 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 28 Nov 2006 17:29:47 -0000 Received: (qmail 89771 invoked by uid 500); 28 Nov 2006 17:29:55 -0000 Delivered-To: apmail-jackrabbit-users-archive@jackrabbit.apache.org Received: (qmail 89755 invoked by uid 500); 28 Nov 2006 17:29:55 -0000 Mailing-List: contact users-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@jackrabbit.apache.org Delivered-To: mailing list users@jackrabbit.apache.org Received: (qmail 89746 invoked by uid 99); 28 Nov 2006 17:29:55 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Nov 2006 09:29:55 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: local policy) Received: from [63.247.81.241] (HELO tss8.serverconfig.com) (63.247.81.241) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Nov 2006 09:29:42 -0800 Received: from c-76-17-160-182.hsd1.mn.comcast.net ([76.17.160.182] helo=[192.168.15.151]) by tss8.serverconfig.com with esmtpa (Exim 4.52) id 1Gp6ll-0004dq-Mn for users@jackrabbit.apache.org; Tue, 28 Nov 2006 12:29:21 -0500 Message-ID: <456C7216.3040507@decoursey.net> Date: Tue, 28 Nov 2006 11:29:58 -0600 From: Paul J DeCoursey User-Agent: Thunderbird 1.5.0.8 (Windows/20061025) MIME-Version: 1.0 To: users@jackrabbit.apache.org Subject: Re: Storing multi-part documents in repository References: <5b3747160611280919y27f79del30da708fe87d7d4d@mail.gmail.com> In-Reply-To: <5b3747160611280919y27f79del30da708fe87d7d4d@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - tss8.serverconfig.com X-AntiAbuse: Original Domain - jackrabbit.apache.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - decoursey.net X-Source: X-Source-Args: X-Source-Dir: X-Virus-Checked: Checked by ClamAV on apache.org David Moss wrote: > Hi, > > This isn't strictly a Jackrabbit issue, but is related to the way I > use it > and I hope will be familiar to anyone who's used jackrabbit for a CMS or > similar. > > I'm looking to store both single, and multi-part documents (e.g. html > page, > with referenced images) within the repository and then serve these out > from > the repository as part of a web application. My first thoughts are to > store > the document dependencies as child nodes of the main document node. > However, I don't think storing the data is a problem. The difficulty is > with how best to retrieve it. > > If, for example, I simply pull an HTML document from the repository and > stream it to a user's browser in response to a click, the links within > that > document to its dependent images etc are invalid. How can I retrieve > these > as well? > > Does anyone have any thoughts on the best approach to this problem? > > I reckon I could either retrieve the files from the repository into a > temporary directory, and serve them back to the client from there, > or write a filter to attempt to retrieve any unrecognised url / url that > matches a mask from the repository returning the document if found, or > 404 > if not. > Neither of these seems like a neat solution. > > If it's useful, I'm using JSF for the user interface etc. > > Thanks > > Dave. > I think the solution needs to be rewriting the HTML on storage. I am assuming that at some point you parse the html to get the list of linked images, at that point you will want to rewrite the references in the html. Paul