<%@ page contentType="text/html;charset=UTF-8"%>
<%@ page import="com.jspsmart.upload.SmartUpload"%>
<%
    //out.println("<script language=\"javascript\">");
    //out.println("window.close();");
    //out.println("</script>");
    String strTableName = net.sz600.tool.SzConvert.toSpaceStr(request.getParameter("tablename"));
    String strFileName = net.sz600.tool.SzConvert.toSpaceStr(request.getParameter("filename"));
    SmartUpload smartUpload = new SmartUpload();
    smartUpload.initialize(pageContext);
    smartUpload.setContentDisposition(null);
    //必须以/开始。表示根目录。
    //smartUpload.downloadFile("/upload/test.txt");

    String strFilePath = "/" + net.sz600.system.SzAnnex.getAnnexPath(strTableName) + strFileName;
    smartUpload.downloadFile(strFilePath);
%>
