commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rosdi Kasim" <ro...@epantai.com.my>
Subject Re: [FileUpload 1.0] Error in compiling to value passed to write()
Date Fri, 25 Jul 2003 09:00:14 GMT

what is the error message?


----- Original Message ----- 
From: "Schalk" <schalk@volume4.co.za>
To: <commons-user@jakarta.apache.org>
Sent: Wednesday, July 23, 2003 8:21 PM
Subject: [FileUpload 1.0] Error in compiling to value passed to write()


Hey there



I have been using the Jakarta FileUpload package for a while now. I recently
downloaded the 1.0 binary package and are having some problems in compiling
my Servlets due to the write() method.



if(item.getName().equals("")) {

                    System.out.println("forwarding");

                } else {

            fileName = item.getName();

            fileFieldName = item.getFieldName();



            StringTokenizer tokenizer = new StringTokenizer(fileName, "\\,
:, /");

            int amount = tokenizer.countTokens();

            for (int i = 0; i < amount -1; i++) {

                tokenizer.nextToken();

            }

            String currentFile = tokenizer.nextToken();



            item.get();

            item.write(folder + currentFile);



            item.delete();



If someone can have a look at the code above and let me know if you can see
where the error is.



Kind Regards

Schalk Neethling

Volume4.Development.Multimedia.Branding

emotionalize.conceptualize.visualize.realize

Tel: +27125468436

Fax: +27125468436

email:schalk@volume4.co.za

web: www.volume4.co.za





Mime
View raw message