Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Jakarta Commons FileUpload and Servlets

 
Scott Parmley
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello everyone!
I am trying to use the 1.0 release of Jakarta Commons FileUpload for handling multipart requests. Once I submit the form to my servlet, the request gets processed by DiskFileUpload.parseRequest(HttpServletRequest request), but the resulting size of the List is 0!!! I've checked to see that the request is indeed a multipart request. I'm not throwing any exceptions. Anyone have any experience with this?
Environment: JBoss+Jetty 3.2.1
Windows2k
HTML:
[...]
<form action="http://parmleys:8080/bq-issue/attachment-proc" method="post" enctype="multipart/form-data" name="attachmentsForm" class="gridItem" id="attachmentsForm">
<div align="center">Upload:
<input type="hidden" name="fileName">
<input type="hidden" name="action" value="write">
<input type="hidden" name="issueID" value="9648">
<input name="uploadFile" type="file" class="gridItem">
<input type="submit" name="Upload" value="Upload" class="gridItem">
</div>
</form>
Java Snippet:
 
Yuval Zukerman
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I do not know about the Jakarta Commons upload but this library did the job for me and is pretty simple to understand.
http://www.servlets.com/cos/index.html
Good luck,
Yuval
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic