Return-Path: Delivered-To: apmail-jackrabbit-dev-archive@www.apache.org Received: (qmail 48934 invoked from network); 12 Jun 2010 08:31:45 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 12 Jun 2010 08:31:45 -0000 Received: (qmail 20626 invoked by uid 500); 12 Jun 2010 08:31:45 -0000 Delivered-To: apmail-jackrabbit-dev-archive@jackrabbit.apache.org Received: (qmail 20248 invoked by uid 500); 12 Jun 2010 08:31:41 -0000 Mailing-List: contact dev-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@jackrabbit.apache.org Delivered-To: mailing list dev@jackrabbit.apache.org Received: (qmail 20115 invoked by uid 99); 12 Jun 2010 08:31:40 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 12 Jun 2010 08:31:40 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of dreams.deepak@gmail.com designates 209.85.211.199 as permitted sender) Received: from [209.85.211.199] (HELO mail-yw0-f199.google.com) (209.85.211.199) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 12 Jun 2010 08:31:33 +0000 Received: by ywh37 with SMTP id 37so1635274ywh.2 for ; Sat, 12 Jun 2010 01:31:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:content-type; bh=sCwVUwF4JxCgogbLqZsaY75HL5caobwek2t6D4gAuW4=; b=ldLV4PtNtS+GWpB9fE4ylpyeDaQEZvAal2IoHL+qnzM6p3ljZAaOQn82s8BUiuOXue p//AgzJjsiBt6YAJwmdldESQnvZTlYwa9OscajA3ZtPZIbmK4D876IsUrRj5gI+Qq0zM 1HIcv8xJduBe/3Qf7EPbuX7s+h/pJnEOqujt0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; b=xvJxmQPfbilN27W3fw1oTqSLPdAEkn7oRIA6+QJ8A7/n7sIWoihD1DCKMtSYx3yUJh P1hnjSx5vsObCXmw3Mo79aOdpf2QAsbE9CX2J2Ger12FFbqlZacyPE+bjAkia5vxR+ls GAxALq6clfltBMapEddReY1ZELXMIvWTvBYWY= Received: by 10.150.60.5 with SMTP id i5mr4291292yba.148.1276331472266; Sat, 12 Jun 2010 01:31:12 -0700 (PDT) MIME-Version: 1.0 Received: by 10.150.50.13 with HTTP; Sat, 12 Jun 2010 01:30:52 -0700 (PDT) In-Reply-To: References: From: Dinesh Dani Date: Sat, 12 Jun 2010 17:30:52 +0900 Message-ID: Subject: Re: Unable to Add the file in Node To: dev@jackrabbit.apache.org Content-Type: multipart/alternative; boundary=000e0cd6a8c205260d0488d114c8 X-Virus-Checked: Checked by ClamAV on apache.org --000e0cd6a8c205260d0488d114c8 Content-Type: text/plain; charset=ISO-8859-1 Thanks a ton for your help. On Fri, Jun 11, 2010 at 9:28 PM, Jukka Zitting wrote: > Hi, > > On Fri, Jun 11, 2010 at 9:54 AM, Dinesh Dani > wrote: > > Does anybody can help me to add the file in a node.I needed this to add > the > > file content in a node.It would be great if you can provide the step by > step > > method to add the file in a node. > > The easiest way to do so is to use the JcrUtils.putFile() methods [1,2]. > > [1] > http://jackrabbit.apache.org/api/2.1/org/apache/jackrabbit/commons/JcrUtils.html#putFile(javax.jcr.Node > , > java.lang.String, java.lang.String, java.io.InputStream) > [2] > http://jackrabbit.apache.org/api/2.1/org/apache/jackrabbit/commons/JcrUtils.html#putFile(javax.jcr.Node > , > java.lang.String, java.lang.String, java.io.InputStream, > java.util.Calendar) > > BR, > > Jukka Zitting > -- Regards, Dinesh Dani --000e0cd6a8c205260d0488d114c8 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Thanks a ton for your help.

On Fri, Jun 11, 2010 at 9:28 PM, Jukka Zitting <= span dir=3D"ltr"><jukka.zitti= ng@gmail.com> wrote:
Hi,

On Fri, Jun 11, 2010 at 9:54 AM, Dinesh Dani <dreams.deepak@gmail.com> wrot= e:
> Does anybody can help me to add the file in a node.I needed this= to add the
> file content in a node.It would be great if you can provide the step b= y step
> method to add the file in a node.

The easiest w= ay to do so is to use the JcrUtils.putFile() methods [1,2].

[1] http://jackrabbit.ap= ache.org/api/2.1/org/apache/jackrabbit/commons/JcrUtils.html#putFile(javax.= jcr.Node,
java.lang.String, java.lang.String, java.io.InputStream)
[2] http://jackrabbit.apache.or= g/api/2.1/org/apache/jackrabbit/commons/JcrUtils.html#putFile(javax.jcr.Nod= e,
java.lang.String, java.lang.String, java.io.InputStream,
java.util.Calen= dar)

BR,

Jukka Zitting



--
Regards,
Dinesh Dani
--000e0cd6a8c205260d0488d114c8--