日期:2014-05-17 浏览次数:21076 次
try{
                // 初始化 
                response.reset();//重定向,即可解决异常问题,并可以保存为中文字符
                SmartUpload su = new SmartUpload();
                su.initialize(pageContext); 
                su.setContentDisposition(null); 
                
                
                System.out.println(strPath+strFileName);
                su.downloadFile(strPath+strFileName,"text/x-msdownload",new String(jc.getBytes(),"ISO-8859-1"),65536);
            }catch(java.io.FileNotFoundException ex){
                out.print("<br/><br/><center><h3>没有找到下载的文件<a href='javascript:history.back(-1);'>返回</a></h3></center>");
            }