Return-Path: Delivered-To: apmail-jackrabbit-users-archive@locus.apache.org Received: (qmail 57864 invoked from network); 29 Nov 2006 09:24:20 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 29 Nov 2006 09:24:20 -0000 Received: (qmail 20169 invoked by uid 500); 29 Nov 2006 09:23:47 -0000 Delivered-To: apmail-jackrabbit-users-archive@jackrabbit.apache.org Received: (qmail 20158 invoked by uid 500); 29 Nov 2006 09:23:47 -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 20083 invoked by uid 99); 29 Nov 2006 09:23:47 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 29 Nov 2006 01:23:46 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of thomas.tom.mueller@gmail.com designates 66.249.92.172 as permitted sender) Received: from [66.249.92.172] (HELO ug-out-1314.google.com) (66.249.92.172) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 29 Nov 2006 01:23:35 -0800 Received: by ug-out-1314.google.com with SMTP id m3so21487422uge for ; Wed, 29 Nov 2006 01:23:14 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=p9pWEGIkcrAnNtZ/gIkoMX01hZEiRm7j83rP2kzH0BOjEXRowGSc29ixKKkqTuz2Gff8AuPB1iQqJG8+6ZpmY42hIcGvpV9bxReAYOnWu7auixMR/AvN3bqEbjwWumK/Nl9/mR7SiSMblvbHnukHbA8pJ9OB4WhLtD+vRmUMW4s= Received: by 10.78.185.15 with SMTP id i15mr1862130huf.1164792193788; Wed, 29 Nov 2006 01:23:13 -0800 (PST) Received: by 10.78.124.20 with HTTP; Wed, 29 Nov 2006 01:23:13 -0800 (PST) Message-ID: <5f211bd50611290123r4abbd2caja92fc4823511ec12@mail.gmail.com> Date: Wed, 29 Nov 2006 10:23:13 +0100 From: "Thomas Mueller" To: users@jackrabbit.apache.org Subject: Re: Storing multi-part documents in repository In-Reply-To: <5b3747160611290117t34aa8406g22fb3d28f3044758@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <5b3747160611280919y27f79del30da708fe87d7d4d@mail.gmail.com> <456C7216.3040507@decoursey.net> <5f211bd50611281120l2830889m1926c63ede19eccf@mail.gmail.com> <456C8F3E.9000905@decoursey.net> <5b3747160611290117t34aa8406g22fb3d28f3044758@mail.gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org Hi, FYI, Firefox doesn't fully support MHT yet http://en.wikipedia.org/wiki/MHTML Thomas On 11/29/06, David Moss wrote: > Thanks, > > After looking into it a little, I think I'm either going to go down the path > of rewriting the URLs, or converting the data to MHT so all the data is > within a single file. > > Thanks again. > > D. > > On 11/28/06, Paul J DeCoursey wrote: > > > > Thomas Mueller wrote: > > > Hi, > > > > > > If the images (or links) are relative (for example > > href="image/help.gif">...) then you could write a servlet to retrieve > > > the data from the repository. The servlet would need to analyze the > > > URL, read the correct data from the JCR repository, and return the > > > byte stream. > > > > > I really think that would be inefficient, better to rewrite the stored > > data. Just my opinion. > > > > > Thomas > > > > > > On 11/28/06, Paul J DeCoursey wrote: > > >> 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 > > >> > > >> > > > > > > > > >