• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

Uploading several files with Formfiles stopped working with jdk 1.8

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In our system we have a form where you can add attachments to upload. this will result in something like this.

<div id="multiattach">
<input name="uploads[1]" class="multiattachinput" type="file">
<input name="uploads[0]" class="multiattachinput" type="file">
</div>

Where the number of inputs is dynamic. When the form is submitted it is handled by a struts validatorform and the above is handle with

public void setUploads(int iIndex, FormFile formFile){
//Handle the file
}

This method is called once for every attachment. This has worked, but now I have changed eclipse and it turns out that if under windows -preferences - installed JRE have 1.8 It does not work.
The method setUploads is simple never called. It seems like a silly error and everything else works so I don't want to have to downgrade to jdk1.6 again.
anyone has any ideas about how to fix this?


OK I actually managed to fix this. It turns out that if you have a method called getUploads then for some reason the setUploads is never called..
I renamed my getUploads and now everything works.
 
reply
    Bookmark Topic Watch Topic
  • New Topic