From users-return-5292-apmail-jackrabbit-users-archive=jackrabbit.apache.org@jackrabbit.apache.org Thu Nov 01 07:02:06 2007 Return-Path: Delivered-To: apmail-jackrabbit-users-archive@locus.apache.org Received: (qmail 87245 invoked from network); 1 Nov 2007 07:02:06 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 1 Nov 2007 07:02:06 -0000 Received: (qmail 97663 invoked by uid 500); 1 Nov 2007 07:01:53 -0000 Delivered-To: apmail-jackrabbit-users-archive@jackrabbit.apache.org Received: (qmail 97298 invoked by uid 500); 1 Nov 2007 07:01:53 -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 97288 invoked by uid 99); 1 Nov 2007 07:01:53 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Nov 2007 00:01:52 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of jukka.zitting@gmail.com designates 64.233.162.224 as permitted sender) Received: from [64.233.162.224] (HELO nz-out-0506.google.com) (64.233.162.224) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Nov 2007 07:01:56 +0000 Received: by nz-out-0506.google.com with SMTP id s18so327133nze for ; Thu, 01 Nov 2007 00:01:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=/K+Jd0Brzva+1dcKImvHjIPu0ALykO4TUr1U1VZzKQM=; b=ntrGK1sjKfNULr/medvOnpNqGDDUDIRjW7fIB+h9lHGbX3wGMY+D3bExVF+bGUqjb7OjkxxMb0Agb32ZpYWKHhu3quURb+V9nI+J7n+rBs1wFP3fL26aChHBmmesFSWWizv0+BLSj3m2iJ/MWetX9Pw9E0wVjPmE8ijYjU/QU90= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=MDLoFd6m4mGKFX4KlxVVdXsoAUBLTEnXXL8TdKtHadNlAUEwY2qMwF+BaKNkprjcNGuY2CBZ3FKw4UWIu8v2HHfRC30WfblQJaTZN0CXDVOPffaRhiKAzSg8mZMH65mh8NZhsbyG2UAH4DjRBfPEbEZJ2cgkFjMchttoFK0Vgow= Received: by 10.142.156.2 with SMTP id d2mr23250wfe.1193900494465; Thu, 01 Nov 2007 00:01:34 -0700 (PDT) Received: by 10.142.201.4 with HTTP; Thu, 1 Nov 2007 00:01:34 -0700 (PDT) Message-ID: <510143ac0711010001h3aab1bd2nb3cf8ad178040c7c@mail.gmail.com> Date: Thu, 1 Nov 2007 09:01:34 +0200 From: "Jukka Zitting" To: users@jackrabbit.apache.org Subject: Re: Image display In-Reply-To: <92bf3b910710311834x2eac0891tb5ba0def68b49480@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <92bf3b910710311834x2eac0891tb5ba0def68b49480@mail.gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org Hi, On 11/1/07, Ryan Bales 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