File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes Jsp and Apache commons upload Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Jsp and Apache commons upload" Watch "Jsp and Apache commons upload" New topic
Author

Jsp and Apache commons upload

frank braunstein
Ranch Hand

Joined: Dec 17, 2009
Posts: 60
Good evening,
I hope there is someone in this Forum who can help me. I'm trying this -Using FileUpload- tutorial since yesterday, which explains how to use the Apache-Commons-fileupload-API. Unfortunately after doing everything as described by the tutorial i get a blank page to see. This is my servlet-code:

Before you start telling me its the web.xml that is configured wrongly, i tell you that commenting out things like this:

prints the outer out-println. So it has something to do with . But i don't know exactly what goes wrong when the server executes that line of code. Any hints strongly appreciated. Ah, of course this is the corresponding html-file.

As you can see the enctype is set, as is the file-type.
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Anything in the logs?
frank braunstein
Ranch Hand

Joined: Dec 17, 2009
Posts: 60
Hold everything. In the tutorial's first paragraph "Using FileUpload" the author has mentioned some dependencies with Apache's commons-IO library. After adding this library to my classpath it seems to work, but i still cant iterate over the request's item's. But the topics question is resolved.

UPDATE:
The step above actually solved the problem and a exclamation mark in the if statement.

 
Don't get me started about those stupid light bulbs.
 
subject: Jsp and Apache commons upload
 
Similar Threads
Servlet File Upload and JQuery as his brothers
user authentication and dao
web service integration using Netbeans IDE
not able to insert values in ms access database
Problem with file upload. Problem lies in javascript/dojo