private String uploadPic(HttpServletRequest request, HttpServletResponse response) throws Exception  {
		DiskFileItemFactory fac = new DiskFileItemFactory();
        ServletFileUpload upload2 = new ServletFileUpload(fac);
        upload2.setHeaderEncoding("utf-8");
        List fileList = null;
        fileList = upload2.parseRequest(request); 
        String number = ((FileItem)fileList.get(2)).getString();   //获取directory参数

确认参数固定后可以通过这种方式取到参数值后重新命名拿取
enctype="multipart/form-data" 上传方式读取FILE之外的值

文档参考地址:https://www.cnblogs.com/kenkofox/archive/2011/03/26/1996258.html

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-06-03
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-04-13
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-14
  • 2021-09-10
  • 2022-12-23
相关资源
相似解决方案