• 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
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

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.
 
I'm doing laundry! Look how clean this tiny ad is:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic