aspose file tools*
The moose likes Other Open Source Projects and the fly likes call servlet with multipart, apache.commons.fileupload how ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "call servlet with multipart, apache.commons.fileupload how ?" Watch "call servlet with multipart, apache.commons.fileupload how ?" New topic
Author

call servlet with multipart, apache.commons.fileupload how ?

Frank Jacobsen
Ranch Hand

Joined: May 17, 2002
Posts: 356
I want to create a java program that calls my servlet

I have done this before, like this:



But now i have modified my servlet, so it can use mulitpart, se the code below.......

But what do i have to do in my client "java program on pc" , to test this ?

so this stament becomes true ?

boolean isMultipart = ServletFileUpload.isMultipartContent(request);

I can see many examples on the internet, how to do this from a JSP, but i want to call the servlet from a java program


Anyone out there that can give me a hint, on this issue



// Frank
Deepak Bala
Bartender

Joined: Feb 24, 2006
Posts: 6662
    
    5

HTTP Client allows multipart file uploads and they have a java program that does exactly that in their sample code section

http://svn.apache.org/viewvc/httpcomponents/oac.hc3x/trunk/src/examples/


SCJP 6 articles - SCJP 5/6 mock exams - More SCJP Mocks
Frank Jacobsen
Ranch Hand

Joined: May 17, 2002
Posts: 356
Thanks a lot, this was weeeeeeeeeeeery helpful to me

Frank
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: call servlet with multipart, apache.commons.fileupload how ?