try{
if (file!=null&&file.length()>0){
if(!wsFileUpload.isValidSize(file.length(),wsFileUpload.getLogoPicMaxSize())){throw new Exception("文件超出大小");}
if(!wsFileUpload.isValidFile(fileContentType, wsFileUpload.getLogoPicType())){throw new Exception("类型不支持");}
//省略其它代码
}
}catch(Exception e){
//e.printStackTrace();
//this.addFieldError("uploadErr", e.getMessage()); 该语句加入无法正确跳转到courseeditinfo这个结果
this.getRequest().setAttribute("uploadErr", e.getMessage());
}finally{
this.setCsid(cs.getCourseId().toString());
return "courseeditinfo";
}
原因何在?