commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Cooper" <mart...@apache.org>
Subject Re: [FileUpload] upload.parseRequest(request) failure
Date Fri, 10 Mar 2006 16:22:17 GMT
On 3/10/06, Vineet Billorey <vineet.billorey@monsoonconsulting.com> wrote:
>
> OK. I tried this.
>
> But Sorry. Result was the same.
>
> Any new sugestion please?


In your original message, you said you were running on Windows 2000. But the
path you are trying to save to looks more like a Unix path, including
Unix-style separators, and there is no drive letter specified. Try adding
some temporary code, before the write(), to check that the directory is OK.
For example:

    File temp = new File(upload_path);
    if (!(temp.exists() && temp.isDirectory())) {
        // The path is your problem
    }

--
Martin Cooper


Thanks in ADVANCE.
>
> Vineet Billorey
>
> ----- Original Message -----
> From: "Stephen Colebourne" <scolebourne@btopenworld.com>
> To: "Jakarta Commons Users List" <commons-user@jakarta.apache.org>
> Sent: Friday, March 10, 2006 2:30 PM
> Subject: Re: [FileUpload] upload.parseRequest(request) failure
>
>
> > Martin Cooper wrote:
> > >>File saveTo = new File(upload_path+"/"+name);
> >
> > This should be considered a bug. You should be using:
> > new File(upload_path, name);
> > As the line separator character can vary by OS.
> >
> > Stephen
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: commons-user-help@jakarta.apache.org
> >
> >
> >
> >
> > --
> > No virus found in this incoming message.
> > Checked by AVG Free Edition.
> > Version: 7.1.375 / Virus Database: 268.2.0/275 - Release Date: 3/6/2006
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message