tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From André Warnier>
Subject Re: Create FileInputStream in servlet from remote file with accentuated character name
Date Tue, 22 Sep 2009 19:24:01 GMT
Sylvie Perrin wrote:
>> - your application, running (later) under Tomcat, is supposed to read 
>> these files and do something with them.
>> I suppose that you do not know in advance, what the names of these 
>> files will be, and you just have to take what is there. Is that correct ?
> You perfectly undestood requirements of my real application.
> I know that I will expect others wonderful problems :-)
Ok, then we need Christopher's Java knowledge now.
Christopher, how does one, in Java, read a directory item by item ?
We need this kind of thing :

- open the directory
- while (variable fn = next directory item) {
    - next if item is not a regular file
    - open the file named fn
    - do something to that file
    - close the file
    - delete the file ?
- close the directory

And (just to anticipate the next issue), Sylvie, does your program 
actually need to read the content of the file and do something with that 
content ?

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message