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);
    }

 

相关文章:

  • 2021-04-17
  • 2022-02-07
  • 2021-09-15
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-08-12
  • 2021-09-12
  • 2021-08-21
  • 2021-04-25
  • 2021-08-09
  • 2022-12-23
  • 2022-01-04
相关资源
相似解决方案