jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul J DeCoursey <p...@decoursey.net>
Subject Re: Storing multi-part documents in repository
Date Tue, 28 Nov 2006 17:29:58 GMT
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.


View raw message