jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Mueller" <thomas.tom.muel...@gmail.com>
Subject Re: Storing multi-part documents in repository
Date Wed, 29 Nov 2006 09:23:13 GMT
Hi,

FYI, Firefox doesn't fully support MHT yet
http://en.wikipedia.org/wiki/MHTML

Thomas

On 11/29/06, David Moss <mossdo@googlemail.com> 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 <paul@decoursey.net> wrote:
> >
> > Thomas Mueller wrote:
> > > Hi,
> > >
> > > If the images (or links) are relative (for example <a
> > > 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 <paul@decoursey.net> 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
> > >>
> > >>
> > >
> >
> >
>
>

Mime
View raw message