Gangmax Blog

My Tip 18 File Upload

当使用commons-fileupload.jar处理文件上传时,发生异常:

1
org.apache.commons.fileupload.FileUploadBase$InvalidContentTypeException: the request doesn't contain a multipart/form-data or multipart/mixed stream, content type header is…

原因在于在jsp的

中,应该设置ENCTYPE=”multipart/form-data”,详情参考这里

Comments