这是 Action
public String execute() throws Exception {
contentType = getSchedule_contenttype();
String filename = this.getSchedule_name();
contentDisposition = "attachment;filename="+filename;
String path = this.getSchedule_src();
ServletContext servletContext =
ServletActionContext.getServletContext();
String fileName = servletContext.getRealPath(path);
inputStream = new FileInputStream(fileName);
contentLength = inputStream.available();
return SUCCESS;
}
------解决思路----------------------
URLEncode编码一下就行了