org.apache.commons.fileupload.FileUploadBase$InvalidContentTypeException求助
org.apache.commons.fileupload.FileUploadBase$InvalidContentTypeException: the request doesn't contain a multipart/form-data or multipart/mixed stream, content type header is null
代码本身是没有问题的,但是C++的项目sso访问我写的java项目的时候按照原有的方式找不到对应的servlet,所以还需要sso访问servlet,就在sso访问servlet的时候出错了,请大牛指点下
页面代码
<f:loadBundle basename="com.webapp.resource.WebAppResource"var="resource" /> <h:form id="fromUpload" enctype="multipart/form-data" onsubmit="startProgress()"> 里边是内容…… </h:form>
function submitUpload(){ usersFunction.getUsernameAndPassword(function(data){ if(data.length > 3){ var fromUpload = document.getElementById("fromUpload"); fromUpload.action='http://192.168.0.153:8080/users/servlet/SSOAuth?PWSecurity=true&username=' +data.split(",")[0]+'&password='+data.split(",")[1]+'&goto=../servlet/addErrorMsg? returnUrl='+'addError.faces'; fromUpload.method="POST"; fromUpload.submit(); }});}
function submitUpload(){ usersFunction.getUsernameAndPassword(function(data){ if(data.length > 3){ var fromUpload = document.getElementById("fromUpload"); fromUpload.action='http://192.168.0.153:8080/users/servlet/SSOAuth?PWSecurity=true&username=' +data.split(",")[0]+'&password='+data.split(",")[1]+'&goto=../servlet/addErrorMsg? returnUrl='+'addError.faces'; fromUpload.method="POST"; fromUpload.submit(); }});}