Re: [FileUpload] Getting wrong filename from FileItem

2005-05-06 Thread Dakota Jack
; > 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

Re: [FileUpload] Getting wrong filename from FileItem

2005-05-06 Thread Dakota Jack
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. > > > >

Re: [FileUpload] Getting wrong filename from FileItem

2005-05-06 Thread Dakota Jack
#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

Re: [FileUpload] Getting wrong filename from FileItem

2005-05-06 Thread Mihael Knezevic
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

Re: [FileUpload] Getting wrong filename from FileItem

2005-05-06 Thread Dakota Jack
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 >

Re: [FileUpload] Getting wrong filename from FileItem

2005-05-06 Thread Dakota Jack
> 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

AW: [FileUpload] Getting wrong filename from FileItem

2005-05-06 Thread Knezevic, Mihael
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

Re: [FileUpload] Getting wrong filename from FileItem

2005-05-06 Thread Dakota Jack
; 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,

AW: [FileUpload] Getting wrong filename from FileItem

2005-05-06 Thread Knezevic, Mihael
; 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

Re: [FileUpload] Getting wrong filename from FileItem

2005-05-06 Thread Dakota Jack
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

Re: [FileUpload] Getting wrong filename from FileItem

2005-05-06 Thread Dakota Jack
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

AW: [FileUpload] Getting wrong filename from FileItem

2005-05-06 Thread Knezevic, Mihael
> -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

Re: [FileUpload] Getting wrong filename from FileItem

2005-05-05 Thread Dakota Jack
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

Re: [FileUpload] Getting wrong filename from FileItem

2005-05-05 Thread Mihael Knezevic
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

Re: [FileUpload] Getting wrong filename from FileItem

2005-05-04 Thread Frank W. Zammetti
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

Re: [FileUpload] Getting wrong filename from FileItem

2005-05-04 Thread Dakota Jack
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

Re: [FileUpload] Getting wrong filename from FileItem

2005-05-04 Thread Frank W. Zammetti
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

Re: [FileUpload] Getting wrong filename from FileItem

2005-05-04 Thread Dakota Jack
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

Re: [FileUpload] Getting wrong filename from FileItem

2005-05-04 Thread robert burrell donkin
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

Re: [FileUpload] Getting wrong filename from FileItem

2005-05-04 Thread Dakota Jack
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

[FileUpload] Getting wrong filename from FileItem

2005-05-04 Thread Mihael Knezevic
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