File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes Jakarta Commons FileUpload and Servlets Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Jakarta Commons FileUpload and Servlets" Watch "Jakarta Commons FileUpload and Servlets" New topic

Jakarta Commons FileUpload and Servlets

Scott Parmley

Joined: Oct 30, 2003
Posts: 3
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
<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">
Java Snippet:
Yuval Zukerman

Joined: Dec 03, 2003
Posts: 1
I do not know about the Jakarta Commons upload but this library did the job for me and is pretty simple to understand.
Good luck,
I agree. Here's the link:
subject: Jakarta Commons FileUpload and Servlets
jQuery in Action, 3rd edition