//上传
public String add() throws Exception {
try{
if(product_type.getPtid()>0){
product_typeBiz.update(product_type);
}else{
product_typeBiz.add(product_type);
}
if(producy_typeImage!=null){
String vpath="/DASCOM/image/"+product_type.getPtname()+".jpg";
ServletContext application = ServletActionContext.getServletContext();
File destFile = new File("D:/"+vpath);
FileUtils.copyFile(producy_typeImage, destFile);
}
}catch(BizException e){
this.jsonResult=new JsonResult(false, e.getMessage());
}
return SUCCESS;
}
JSP代码段
打印机类型 | |||
图片 |
|
||