zoukankan      html  css  js  c++  java
  • smartUpload组件单文件下载

    public void doGet(HttpServletRequest request, HttpServletResponse response)
                throws ServletException, IOException {
            String filename = request.getParameter("filename");
            SmartUpload su = new SmartUpload();
            su.initialize(getServletConfig(), request, response);
            su.setContentDisposition(null);//关闭默认的打开方式;
            try {
                su.downloadFile("images/"+filename);
            } catch (SmartUploadException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            }
            
        }
    
        
        public void doPost(HttpServletRequest request, HttpServletResponse response)
                throws ServletException, IOException {
            doGet(request, response);
        }
  • 相关阅读:
    SpringMVC
    SpringMVC
    SpringMVC
    Spring
    Spring
    值类型和引用类型
    判断字符串的开头和结尾
    二分法(课后)
    验证码
    从1-36中随机出6个不相等的数
  • 原文地址:https://www.cnblogs.com/james-roger/p/4981637.html
Copyright © 2011-2022 走看看