日期:2014-05-20  浏览次数:20979 次

java 在linux下 文件下载的路径问题
文件上传的路径是:

filePath=/home/vccweb/tomcat/webapps/vcc_self_upload/jsp/knowledge/uploadFolder/13661664740027348.txt
pageFilePath=http://xx.xx.cn:9977/vcc_self_upload//jsp/knowledge/uploadFolder/13661664740027348.txt


但是下载的时候提示:

downLoadUrl=http://xx.xx.cn:9977/vcc_self_upload//jsp/knowledge/uploadFolder/13661664740027348.txt   -----下载路径
java.io.FileNotFoundException: http://myservice.uucall.cn:9977/vcc_self_upload//jsp/knowledge/uploadFolder/13661664740027348.txt
        at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1147)
        at com.uucall.vcc.crm.web.KnowledgeAction.dlKnowledge(KnowledgeAction.java:108)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at com.uucall.vcc.struts.BeanAction.execute(BeanAction.java:56)
        at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:449)
        at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:234)
        at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1285)
        at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:456)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at com.uucall.vcc.crm.filter.LoginFilter.doFilter(LoginFilter.java:47)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at com.uucall.vcc.crm.filter.EncodingFilter.doFilter(EncodingFilter.java:33)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at com.uucall.vcc.sso.AutoLoginFilter.doFilter(AutoLoginFilter.java:56)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:228)