I found that after I update the Flash version, I will report the 302 error when I use uploadify. After studying for half a day, I found that the uploaded action was used to determine whether the user was logged on based on the session. If I did not log on, I jumped to the login page, so I encountered a 302 jump error. After the Flash version is updated, the session value cannot be obtained through uploadify. My current solution is:
1. Upload the action URL to cancel the session acquisition operation. It is very easy to get the session value in advance, and then use the parameter form in the URL to bring it over.
Original code:
JSP end:
$ ("# Imagefile"). uploadify ({
Height: 30,
SWF: '/JS/uploadify/uploadify.swf ',
Uploader: '/upload. Do ',
Width: 120,
Onuploadsuccess: function (file, Data, response ){
VaR datt = new date ();
VaR vdata = eval ('+ Data + ')');
VaR vdatainfo = (datt. getyear () + 1900) + '-' + (datt. getmonth () + 1) + '-' + datt. getdate ();
$ (". Statusinfo ")
. Html (
'Last Update Time: <SPAN class = "graytxt"> '+ vdatainfo +' </span> <a class = "btn_delete imagebuttons" href = "javascript: void (0) "onclick =" javascript: tododel ('+ vdata. rid + ') "> </a> ');
}
});
});
Java:
Beike bksession = (beike) Req. getsession (). getattribute ("bke ");
After modification:
JSP end:
$ ("# Imagefile"). uploadify ({
Height: 30,
SWF: '/JS/uploadify/uploadify.swf ',
Uploader: '/upload. do? Bkeid = '+ $ {bkeid },
Width: 120,
Onuploadsuccess: function (file, Data, response ){
VaR datt = new date ();
VaR vdata = eval ('+ Data + ')');
VaR vdatainfo = (datt. getyear () + 1900) + '-' + (datt. getmonth () + 1) + '-' + datt. getdate ();
$ (". Statusinfo ")
. Html (
'Last Update Time: <SPAN class = "graytxt"> '+ vdatainfo +' </span> <a class = "btn_delete imagebuttons" href = "javascript: void (0) "onclick =" javascript: tododel ('+ vdata. rid + ') "> </a> ');
}
});
});
Java:
String bkeid = request. getparameter ("bkeid ");