I am using PhoneGap 1.5 for an iOS app and I need to upload photos to a Java Servlet via the FileTransfer object. Has anyone done this before? The only examples I've seen utilize PHP and it's not clear to me what's going on when my servlet is invoked. Will post code shortly.
If the PhoneGap FileTransfer sends a HTTP multipart/form-data request conform the RFC2388 spec, then you could just use the standard request.getPart()
method or, when you're still on Servlet version 2.5 or older, the Apache Commons FileUpload for this as outlined in detail in this answer: How to upload files to server using JSP/Servlet?