Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Apache commons file upload

 
Noopur Kore
Ranch Hand
Posts: 77
Java Netbeans IDE Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here I'm trying to upload a file and write it's content in my JSP. Here's my code :

Here my string file appears to be empty. Can someone please tell me where am I going wrong?
Because while debugging I can see the file being uploaded to the servlet but I'm unable to retrieve contents of the file. Please help.
 
Noopur Kore
Ranch Hand
Posts: 77
Java Netbeans IDE Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


I got this code from my friend. Can someone please help me in understanding how this while loop is working?
 
Swastik Dey
Rancher
Posts: 1625
5
Android Java Java ME
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


The iterator above is collection of objects retrieved in request object. Then you are iterating through that collection using the loop, and comparing the type of object i.e whether its a form field (text,checkbox,radio etc) or a file type object i.e input type=file.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic