@@ -0,0 +1,1332 @@
+package com.helloworld.servlet;%0A%0Aimport javax.servlet.ServletException;%0Aimport javax.servlet.http.HttpServletRequest;%0Aimport javax.servlet.http.HttpServletResponse;%0Aimport javax.servlet.ServletOutputStream;%0Aimport java.io.IOException;%0A%0Aimport java.io.File;%0Aimport java.io.FileInputStream;%0Aimport java.io.BufferedInputStream;%0A%0A%0Apublic class HelloServlet extends javax.servlet.http.HttpServlet %7B%0A    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException %7B%0A        ServletOutputStream out = response.getOutputStream();%0A        String fileName = request.getParameter(%22file%22);%0A        File file = new File(fileName);%0A        if (file.exists()) %7B%0A            BufferedInputStream bufferedInputStream = new BufferedInputStream(new FileInputStream(file));%0A            int size = 0;%0A            byte%5B%5D b = new byte%5B4096%5D;%0A            while ((size = bufferedInputStream.read(b)) != -1) %7B%0A                out.write(b, 0, size);%0A            %7D%0A            out.flush();%0A            out.close();%0A            bufferedInputStream.close();%0A        %7D else %7B%0A            response.sendError(HttpServletResponse.SC_NOT_FOUND);%0A            return ;%0A        %7D%0A        response.setContentType(%22application/octet-stream%22);%0A        response.setHeader(%22Content-Disposition%22, %22attachment;%22);%0A    %7D%0A%7D%0A

add src code