上传过程怎么将错误信息显示在前台呢

coderlu 发布于 2014/10/15 17:15
阅读 577
收藏 0
uploader.bind('Error', function(up, file, response) {
alert("Error event.");
response = jQuery.parseJSON( response.msg );
alert(response.error.code);
 });




在Java后台里怎么把错误信息交给response?

HttpServletResponse response = ServletActionContext.getResponse();
this.msg = "The file of \"" + this.name + "\" already exists, please modify your a new name and then re-upload.";
response.setStatus(500);
response.getWriter().print(msg);



我这里返回的response是undefind的。

加载中
返回顶部
顶部