download « Client « JSP-Servlet Q&A





1. How to download a file from server machine to client machine using jsp    bytes.com

Hi, In my application, I have an excel file stored on my server machine. How can I download that excel file on to my client machine using jsp. Is there any ...

2. Download CSS to client    coderanch.com

5. Download a file from Server to Client    coderanch.com

8. client code downloading from Servlet    coderanch.com

package com.MyServlet; import java.io.IOException; import java.io.*; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.*; public class TestServlet extends HttpServlet { public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType("application/jar"); ServletContext ctx = getServletContext(); InputStream is = ctx.getResourceAsStream("/htmlconverter.jar"); int read=0; byte[] bytes = new byte[1024]; OutputStream os = response.getOutputStream(); while((read = is.read(bytes)) != -1){ os.write(bytes,0,read); } RequestDispatcher view ...