js代码
代码如下:
$('#file_upload').uploadify({
buttonimage: '${ctx }/commons/uploaddify/img/browse-btn.png',
swf :'${ctx }/commons/uploaddify/uploadify.swf',
uploader :'../servlet/defaultdispatcher;jsessionid=${pagecontext.session.id}?__action=xxx',
filetypeexts: '*.jpg;*.png;*.gif;*.bmp',
filetypedesc: '图像文件',
formdata: {
timestamp: new date().gettime()
},
onselect: function(file){
//重写校验
},
onuploadprogress: function(file,bytesuploaded,bytestotal,totalbytesuploaded,totalbytestotal){
$('#pregress').html('总共需要上传'+bytestotal+'字节,'+'已上传'+totalbytestotal+'字节');
},
onuploadsuccess: function(file){
//上传成功
}
});
参考网上解决方案,在uploader路径后面增加jsessionid就好。