日期:2014-05-19 浏览次数:20827 次
2012-5-31 13:32:58 org.apache.catalina.core.AprLifecycleListener init 信息: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: E:\Java\jdk1.6.0_20\bin;E:\Tomcat6.0\bin 2012-5-31 13:32:58 org.apache.coyote.http11.Http11Protocol init 信息: Initializing Coyote HTTP/1.1 on http-8080 2012-5-31 13:32:58 org.apache.catalina.startup.Catalina load 信息: Initialization processed in 560 ms 信息: JK: ajp13 listening on /0.0.0.0:8009 2012-5-31 13:33:10 org.apache.jk.server.JkMain start 信息: Jk running ID=0 time=0/31 config=null 2012-5-31 13:33:10 org.apache.catalina.startup.Catalina start 信息: Server startup in 12239 ms
null 检查action中文件下载路径是否正确. 2012-5-31 13:35:21 com.opensymphony.xwork2.util.logging.commons.CommonsLogger error 严重: Can not find a java.io.InputStream with the name [inputStream] in the invocation stack. Check the <param name="inputName"> tag specified for this action. null 检查action中文件下载路径是否正确. 2012-5-31 13:35:21 com.opensymphony.xwork2.util.logging.commons.CommonsLogger error 严重: Can not find a java.io.InputStream with the name [inputStream] in the invocation stack. Check the <param name="inputName"> tag specified for this action. 2012-5-31 13:35:21 com.opensymphony.xwork2.util.logging.commons.CommonsLogger error 严重: Can not find a java.io.InputStream with the name [inputStream] in the invocation stack. Check the <param name="inputName"> tag specified for this action. null 检查action中文件下载路径是否正确. null 检查action中文件下载路径是否正确. 2012-5-31 13:35:31 com.opensymphony.xwork2.util.logging.commons.CommonsLogger error 严重: Can not find a java.io.InputStream with the name [inputStream] in the invocation stack. Check the <param name="inputName"> tag specified for this action. null 检查action中文件下载路径是否正确. 2012-5-31 13:35:31 com.opensymphony.xwork2.util.logging.commons.CommonsLogger error 严重: Can not find a java.io.InputStream with the name [inputStream] in the invocation stack. Check the <param name="inputName"> tag specified for this action. null 检查action中文件下载路径是否正确. 2012-5-31 13:35:31 com.opensymphony.xwork2.util.logging.commons.CommonsLogger error 严重: Can not find a java.io.InputStream with the name [inputStream] in the invocation stack. Check the <param name="inputName"> tag specified for this action.
public class DownloadActionTrue extends ActionSupport {
/**
* generate serialVersionUID
*/
private static final long serialVersionUID = -1502162994976647682L;
// 下载文件原始存放路径
private final static String DOWNLOADFILEPATH = "/upload/";
// 文件名参数变量
private String fileName;
public String getFileName() {
return fileName;
}
public void setFileName(String fileName) throws UnsupportedEncodingException {
this.fileName = fileName;
}
@Override
public String execute() throws Exception {
return SUCCESS;
}
// 从下载文件原始存放路径读取得到文件输出流
public InputStream getInputStream() throws Exception {
String realPath = DOWNLOADFILEPATH + fileName;
InputStream inputStream = ServletActionContext.getServletContext()
.getResourceAsStream(realPath);
System.out.printl