首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > JAVA > J2EE开发 >

org.apache.commons.fileupload.FileUploadBase$InvalidContentTypeException

2012-08-17 
org.apache.commons.fileupload.FileUploadBase$InvalidContentTypeException求助org.apache.commons.file

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的时候出错了,请大牛指点下

页面代码

HTML code
<f:loadBundle basename="com.webapp.resource.WebAppResource"var="resource" />            <h:form id="fromUpload" enctype="multipart/form-data" onsubmit="startProgress()">                                      里边是内容……            </h:form>


项目本身访问Servlet的js代码
JScript code
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();  }});}


SSO访问Servlet的js代码
JScript code
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();  }});}


[解决办法]
onsubmit="startProgress()"
换成
action="startProgress()"
试试。
[解决办法]
解决了就好啊

热点排行