Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 70689 invoked from network); 26 Jun 2006 11:05:10 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 26 Jun 2006 11:05:10 -0000 Received: (qmail 24868 invoked by uid 500); 26 Jun 2006 11:04:57 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 24584 invoked by uid 500); 26 Jun 2006 11:04:56 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 24573 invoked by uid 99); 26 Jun 2006 11:04:56 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 26 Jun 2006 04:04:56 -0700 X-ASF-Spam-Status: No, hits=1.4 required=10.0 tests=DNS_FROM_RFC_ABUSE,DNS_FROM_RFC_WHOIS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [206.190.53.34] (HELO smtp109.plus.mail.re2.yahoo.com) (206.190.53.34) by apache.org (qpsmtpd/0.29) with SMTP; Mon, 26 Jun 2006 04:04:55 -0700 Received: (qmail 35335 invoked from network); 26 Jun 2006 11:04:34 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Received:From:To:Subject:Date:Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding:X-Mailer:X-MimeOLE:Thread-Index:In-Reply-To; b=ZtbrFX/TmssmDtmLqdD5g4hcR5xVnI7eqDgq1xBXj6lT07QoONPUvagmgv1ihfa0DL6aEUyBFe4EKihSx0F96FUxf129v68EkdG4xlE7Q4t3/5fbNXVbBAsxpnunfaCM5dDWBR7JGKmfPSONQK0C+HYxWDk1H+VPcNuW7DuMeXA= ; Received: from unknown (HELO timlap) (timlucia@24.62.239.192 with login) by smtp109.plus.mail.re2.yahoo.com with SMTP; 26 Jun 2006 11:04:34 -0000 From: "Tim Lucia" To: "'Tomcat Users List'" Subject: RE: Commons fileUpload: write to disk permission problem Date: Mon, 26 Jun 2006 07:04:32 -0400 Message-ID: <008901c69910$4e33c560$0300a8c0@timlap> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2869 Thread-Index: AcaY/UirKTiLDkWjRX6asgm4suw2MAAErkcQ In-Reply-To: X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N One way is to send back a reference to a servlet that knows how to retrieve the image. I.e., in your .jsp, say: Where 1234 is the primary key (ID) field of the avatar in the DB. Have the servlet set the response type to image/jpeg or image/png or whatever is appropriate, and then stream the bytes out of the blob from the DB. Tim > -----Original Message----- > From: Andrea Salvi [mailto:tudhalyas@gmail.com] > Sent: Monday, June 26, 2006 4:48 AM > To: Tomcat Users List > Subject: Re: Commons fileUpload: write to disk permission problem > > Hi David and thanks for the quick reply. I'll try to use the database to > store the avatars but... I don't know how I can show those images in my > JSP > pages :S Can you please tell me how to do that? Sorry for the noobie > question... :) > > Andrea > > > > 2006/6/26, David Delbecq : > > > > Do not write data in the webapplication folder, this folder is supposed > > to be overwritten when webapplication is redeployed and datas will be > > lost. Instead choose a folder in system you dedicate to your > > webapplication datas and store your avatars there. > > > > Or best .... use a database :) > > > > Andrea Salvi wrote: > > > Hi there! > > > I'm making a forum application with JSP and Servlets, and I wanted to > > > give > > > to the final user the opportunity to upload an avatar to be displayed > > > into > > > his posts. I found the Commons fileUpload library and it works quite > > > well, > > > except for a thing: I can't save the image on the server's file > system, > > > apparently due to a permission problem (as my program tries to write > > > in any > > > folder inside the web application context, Tomcat throws a > > > FileNotFoundException, saying that access to that folder is denied). > > > Can you > > > tell me how can I fix this problem? > > > > > > Regards, > > > Andrea > > > > > > > > > --------------------------------------------------------------------- > > To start a new topic, e-mail: users@tomcat.apache.org > > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org > > For additional commands, e-mail: users-help@tomcat.apache.org > > > > --------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org