You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by Ryan Bales <ul...@gmail.com> on 2007/11/01 02:34:22 UTC
Image display
What is the best way to display an image stored within the repository on a
website. I have been trying to find some examples of this but haven't had
any luck. It would be greatly appreciated if someone could kindly show me an
example servlet that handles binary and sets the correct mime type along
with how I can run a xpath query and display it within jsp. I am pretty new
at this, so please excuse the naive question!
Best,
Ryan
Re: Image display
Posted by Jukka Zitting <ju...@gmail.com>.
Hi,
On 11/1/07, Ryan Bales <ul...@gmail.com> wrote:
> What is the best way to display an image stored within the repository on a
> website. I have been trying to find some examples of this but haven't had
> any luck. It would be greatly appreciated if someone could kindly show me an
> example servlet that handles binary and sets the correct mime type along
> with how I can run a xpath query and display it within jsp.
The best way is probably to save your image as an nt:file/nt:resource
node with the correct jcr:mimeType value. Then you could use the
simple WebDAV servlet (see
org.apache.jackrabbit.j2ee.SimpleWebdavServlet in jackrabbit-webapp)
to serve the image.
BR,
Jukka Zitting