; > File linux = new File("/mydir/myfile.txt");
> > > StdOut.log("log.development","Test ttf ie.getName() = " +
> > > ie.getName());
> > > StdOut.log("log.development","Test ttf linux.getName() = " +
> > > linux.g
name can
> be /mydir/myfile.txt and C:\mydir\myfile.txt. how should the server know
> which file separator to use. hmm. i could take a look at the http request
> data. ain't there a field for the operating system. but that ain't something
> i like to do. these things are always changing.
> > >
>
#x27;t there a field for the operating system. but that ain't something
> i like to do. these things are always changing.
> > >
> > > i'll try your code later. thanks.
> > >
> > > > -Ursprüngliche Nachricht-
> > > > Von: Dak
e a look at the http request
data. ain't there a field for the operating system. but that ain't something
i like to do. these things are always changing.
> >
> > i'll try your code later. thanks.
> >
> > > -Ursprüngliche Nachricht-
> > &g
AIL PROTECTED]> wrote:
> > thanks for all the advice. i'll test it.
> >
> > > -Ursprüngliche Nachricht-
> > > Von: Dakota Jack [mailto:[EMAIL PROTECTED]
> > > Gesendet: Freitag, 6. Mai 2005 09:55
> > > An: Jakarta Commons Users List
>
> request data. ain't there a field for the operating system.
> > but that ain't something i like to do. these things are
> > always changing.
> > >
> > > i'll try your code later. thanks.
> > >
> > > > -Ursprüngliche Nach
thanks for all the advice. i'll test it.
> -Ursprüngliche Nachricht-
> Von: Dakota Jack [mailto:[EMAIL PROTECTED]
> Gesendet: Freitag, 6. Mai 2005 09:55
> An: Jakarta Commons Users List
> Betreff: Re: [FileUpload] Getting wrong filename from FileItem
>
> I
; Von: Dakota Jack [mailto:[EMAIL PROTECTED]
> > Gesendet: Freitag, 6. Mai 2005 09:34
> > An: Jakarta Commons Users List
> > Betreff: Re: [FileUpload] Getting wrong filename from FileItem
> >
> > This code should definitely work. If it does not,
; An: Jakarta Commons Users List
> Betreff: Re: [FileUpload] Getting wrong filename from FileItem
>
> This code should definitely work. If it does not, I sure
> would like to know what happens. What did happen? Did you debug it?
>
>
>
> On
D]
> > Gesendet: Freitag, 6. Mai 2005 08:51
> > An: Jakarta Commons Users List; Knezevic, Mihael
> > Betreff: Re: [FileUpload] Getting wrong filename from FileItem
> >
> > Just so there is no misunderstanding, the browsers have
> > nothing to do with what getName
5/6/05, Knezevic, Mihael <[EMAIL PROTECTED]> wrote:
>
>
> > -Ursprüngliche Nachricht-
> > Von: Dakota Jack [mailto:[EMAIL PROTECTED]
> > Gesendet: Freitag, 6. Mai 2005 08:51
> > An: Jakarta Commons Users List; Knezevic, Mihael
> > Betreff: Re
> -Ursprüngliche Nachricht-
> Von: Dakota Jack [mailto:[EMAIL PROTECTED]
> Gesendet: Freitag, 6. Mai 2005 08:51
> An: Jakarta Commons Users List; Knezevic, Mihael
> Betreff: Re: [FileUpload] Getting wrong filename from FileItem
>
> Just so there is no misunders
Just so there is no misunderstanding, the browsers have nothing to do
with what getName returns. The browsers differ in what name they
provide for the file. Thus, when you get a File object for IE it
gives the full name and for the others the actual file name itself.
You make them all the same i
thanks to all the responses for my question.
actually i didn't know that it was a browser "thing". i thought it was an
operating system thing. thanks for clearing this up. and as this is a browser
specific thing IMHO there should be just a change in the docu where you
should add the fact that t
I know, I've run into this myself... But, it should be a fairly trivial
exercise to write code to extract just the filename (as I believe you've
done). This makes sense to me as an additional method. That way no
existing code gets broken, but newer code can use the new method, which
works as
The data difference is not in the code but in the request data from
the browser. IE puts in the full name and other browsers put in just
the name. Calling [file].getName() gives the same result for all of
them. I don't think there is a way to get a full name from the
browsers that send only the
It seems to me a method to get JUST the filename makes a lot of sense...
what has been the reason for not adding it IN ADDITION to what's there
now? Unfortunately it would make more sense if getName() returned just
the name while there was another method, maybe getFullName() that
returned what
That is an excellent point, Robert. I often forget how horrible it
must be to be immeshed in those programming worlds where there is no
recourse. Too often we shy away, I think, at changing code, even with
the Java distribution itself, license issues notwithstanding.
On 5/4/05, robert burrell do
On Wed, 2005-05-04 at 10:26 -0700, Dakota Jack wrote:
> Some people think this is a bug and some people think that this is a
> feature.
> That is not a problem, however. I just went in and changed the
> commons upload code adding .getName() to the file at this stage. The
> problem you are se
Some people think this is a bug and some people think that this is a
feature. Martin, who makes all the decisions as a practical but not
as a theoretical (so please let's not debate this) matter on this has
decided it is a feature. Since he seems to integrate his day job and
this work, that is no
hi,
i'm quite new to this project and perhaps i'm making some mistakes. perhaps
you can help me.
i'm trying to upload a file from a windows desktop to a linux server running
tomcat 5.0.28.
i'm using the following code to get a FileItem object:
// create a new file upload handler
ServletFileU
21 matches
Mail list logo