Return-Path: Mailing-List: contact commons-user-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list commons-user@jakarta.apache.org Received: (qmail 21819 invoked from network); 25 Aug 2003 15:11:37 -0000 Received: from mail.printtime.com (216.81.251.1) by daedalus.apache.org with SMTP; 25 Aug 2003 15:11:37 -0000 Received: from [65.26.167.205] (HELO printtime.com) by mail.printtime.com (Stalker SMTP Server 1.8b8) with ESMTP id S.0002033880 for ; Mon, 25 Aug 2003 10:09:13 -0500 Message-ID: <3F4A2671.3090801@printtime.com> Date: Mon, 25 Aug 2003 10:08:33 -0500 From: Brian Cook Organization: Print Time User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Jakarta Commons Users List Subject: Re: fileupload name issue References: <002901c36af8$bf62e930$745841db@pp> In-Reply-To: <002901c36af8$bf62e930$745841db@pp> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N I believe this is a known issue. I have run into this same issue before, and O'REILLY noted it on their examples site. http://www.onjava.com/pub/a/onjava/2003/06/25/commons.html?page=3 I am not sure how to correct it in JSP . With servlets I include the following code to define the path. String itemName = item.getName(); // Read in the name with the path File fullFile = new File(item.getName()); File savedFile = new File(getServletContext().getRealPath("/"),fullFile.getName()); item.write(savedFile);