Return-Path: Delivered-To: apmail-jackrabbit-dev-archive@www.apache.org Received: (qmail 11306 invoked from network); 11 Jun 2010 12:29:08 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 11 Jun 2010 12:29:08 -0000 Received: (qmail 78260 invoked by uid 500); 11 Jun 2010 12:29:07 -0000 Delivered-To: apmail-jackrabbit-dev-archive@jackrabbit.apache.org Received: (qmail 78205 invoked by uid 500); 11 Jun 2010 12:29:05 -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 78194 invoked by uid 99); 11 Jun 2010 12:29:04 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 11 Jun 2010 12:29:04 +0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=FREEMAIL_FROM,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of jukka.zitting@gmail.com designates 209.85.214.170 as permitted sender) Received: from [209.85.214.170] (HELO mail-iw0-f170.google.com) (209.85.214.170) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 11 Jun 2010 12:28:57 +0000 Received: by iwn8 with SMTP id 8so1553421iwn.1 for ; Fri, 11 Jun 2010 05:28:36 -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=dDdcEqfNshqirgzT/NTNHufeEaS7Y2uQur58hJ99HZc=; b=CYJPrZ0I3DE1VkZpQtJsF55vKbvsu8VDPc/b4bJf+uztuuwb07MnChJV6SqKkIDgyI GWsNSewKoFe5fR1dUy6ATAUSpC82vHIrcDbhmPOrhNoYlWA8ktDEjDCirgPBfgCUm/eO 5d+UonduEWfj/h8D6V69Jscq5wtD0AExYVU8g= 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=P6ykN5DqGx5u2cqBWp+/xHCxJ0lF5loe80z/odBb7FveE/94KG/HaTXDWl4n7nKQbu EaMnpDLconWTkj91ka+2g1rpYlCzW48k5l8QaviJ3tTkrroLaYjvZXFHt/79Wy1BUH4J WXvWTfdlY4vII8oUMnAurmZERearyUiJpc81k= Received: by 10.42.9.67 with SMTP id l3mr610359icl.73.1276259316344; Fri, 11 Jun 2010 05:28:36 -0700 (PDT) MIME-Version: 1.0 Received: by 10.231.167.68 with HTTP; Fri, 11 Jun 2010 05:28:16 -0700 (PDT) In-Reply-To: References: From: Jukka Zitting Date: Fri, 11 Jun 2010 15:28:16 +0300 Message-ID: Subject: Re: Unable to Add the file in Node To: dev@jackrabbit.apache.org Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org 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