commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Schalk" <sch...@volume4.co.za>
Subject [FileUpload 1.0] Error in compiling to value passed to write()
Date Wed, 23 Jul 2003 12:21:04 GMT
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
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message