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

Problems with HttpUnit uploading a file

 
Nicole Lacoste
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am trying to test a servlet that expects a file to be uploaded. The request's content type is multipart/form-data. In my unit test I am using HttpUnit and here follows my code...



Everytime I try to run it I get the error that "the request because no multipart boundry was found".

Has anyone succeed in using HttpUnit to test file upload on a HttpServlet and can give me some advice?

Thanks,

Nicole
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic