public String execute(){
HttpServletResponse response = ServletActionContext.getResponse();
response.setContentType("text/html;charset=UTF-8");
String realpath =
ServletActionContext.getServletContext().getRealPath(
"/photo");
if (image != null) {
File savefile = new File(new File(realpath), imageFileName);
if(!savefile.getParentFile().exists())
savefile.getParentFile().mkdirs();
FileUtils.copyFile(image, savefile);
}
PrintWriter out = response.getWriter();
success=true;
out.println("{success:'success'}");
return NONE;
}