url中紧跟servlet/jsp文件名加;jsessionid=sessionId,其中sessionId由HttpSession.getId()得到,如http://localhost:8080/aaa/bbb.jsp;jsessionid=975FCCA6FD6058E92DDE932962A44252?para=1
网上解决的方法非常多,但是怎么试都不可以,最后终于发现了玄机,传jsessionid时url写的方式不对,正确写法如下,记住jsessionid与url是用“ ; ”分割的,千万不要写成" ? ":
$('#fileUpload').uploadify({
swf:common_basePath+'/resources/uploadify/scripts/uploadify.swf',
uploader:'/fileupload/upload.do;jsessionid='+sessionid+'?upload_file_key='+sessionkey,
queueID:'fileQueue',
buttonImage:common_basePath+'/images/uploadsel.png',
buttonClass:'my-uploadify-button',
width:73,
height:36,
method:'post',
onQueueComplete:function(queueData){
if(queueData.uploadsErrored==0){
document.getElementById("form1").submit();
}else{
alert("有文件上传失败!");
}
},
auto:false
});
java版 jquery uploadify 通过Flash实现多文件上传 IE 和FireFox 兼容
最新推荐文章于 2016-11-25 22:22:59 发布