Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Frank Jacobsen
Ranch Hand
Posts: 358
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 6663
5
Firefox Browser Linux MyEclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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/
 
Frank Jacobsen
Ranch Hand
Posts: 358
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a lot, this was weeeeeeeeeeeery helpful to me

Frank
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic