Download the site image code and parse the garbled code
// Get site objectsServletContext context = this.getServletContext();// Access to website resourcesString path = context.getRealPath("/imgs/ people .jpg");File file = new File(path);System.out.println(file);// Set the response header to inform the browser how the data will be processedresponse.setHeader("content-disposition","attachment;filename="+URLEncoder.encode(file.getName(),"utf-8")); // Handle filename scramble to specify image format for download// Specifies the byte input stream objectFileInputStream in = new FileInputStream(file);// Gets a byte output stream objectServletOutputStream out = response.getOutputStream();// Read and writebyte [] b = new byte[1024];int len = 0;while((len = in.read(b)) != -1){out.write(b, 0, len);}// Release resourcesin.close();