1.
public String execute(){
String inputPath = ServletActionContext.getRequest().getSession().getServletContext().getRealPath("/")+"/uploads/README/产品使用说明书.pdf";
File um = new File(inputPath);
try {
downName = new String(um.getName().getBytes("GB2312"), "ISO8859-1");
inputStream = new BufferedInputStream(new FileInputStream(um));
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (Exception e) {
// TODO: handle exception
}
return "success";
}