views:

143

answers:

1

Hi,

I'm sending multipart/mixed content message from JSP to servlets but when I used

ServletFileUpload.isMultipartContent(request);

method to check if the request is Multipart or not, I'm getting the output as "false". This is how content type header of my message is looking like:

multipart/mixed; 
    boundary="----=_Part_26_2184190.1271924416255"

Could anyone please tell me how can I parse the request using Apache fileupload API? How the above method can return me an output as "true"

+3  A: 

The conditions are:

  • the request method must be post
  • the content-type must start with multipart/

Check these two via request.getMethod() and request.getContentType()

Bozho