Class Download

java.lang.Object
   |
   +----javax.servlet.GenericServlet
           |
           +----javax.servlet.http.HttpServlet
                   |
                   +----Download

public class Download
extends HttpServlet
This servlet takes a file name as parameter from calling HTML code and generates request to download the file from the server to the client.


Constructor Index

 o Download()

Method Index

 o doGet(HttpServletRequest, HttpServletResponse)
Checks for session validity, gets the filename to be downloaded, and generates appropriate response.
 o init(ServletConfig)

Constructors

 o Download
 public Download()

Methods

 o init
 public void init(ServletConfig config) throws ServletException
Overrides:
init in class GenericServlet
 o doGet
 public void doGet(HttpServletRequest req,
                   HttpServletResponse res) throws ServletException, IOException
Checks for session validity, gets the filename to be downloaded, and generates appropriate response.

Parameters:
req - HttpServletRequest
res - HttpServletResponse
Overrides:
doGet in class HttpServlet