Class sun.server.http.FtpProxyServlet
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class sun.server.http.FtpProxyServlet

java.lang.Object
   |
   +----java.servlet.GenericServlet
           |
           +----java.servlet.http.HttpServlet
                   |
                   +----sun.server.http.FtpProxyServlet

public class FtpProxyServlet
extends HttpServlet
FtpProxyServlet This servlet is used as proxy server for doing FTP. It handles all the local FTP requests from browser by opening an FTP stream to the host designated in the URL and doing anonymous login. It formats the directory listing in HTML so that the browser can correctly display the contents. In order to talk to hosts outside the firewall, the proxy chaining has to be configured in proxy.properties. In that base, the FtpProxyServlet opens HTTP stream to the proxy chain, and relays back the response stream to the browser.

Constructor Index

 o FtpProxyServlet()
Creates a new instance of FtpProxyServlet.

Method Index

 o getServletInfo()
Returns the information of FtpProxyServlet.
 o init(ServletStub)
Initializes the FtpProxyServlet.
 o service(HttpServletRequest, HttpServletResponse)
Services a single ftp request over http protocol.

Constructors

 o FtpProxyServlet
  public FtpProxyServlet()
Creates a new instance of FtpProxyServlet.

Methods

 o init
  public void init(ServletStub stub) throws ServletException
Initializes the FtpProxyServlet. This function is called automatically the first time it gets loaded.
Parameters:
ServletStub - servlet information
Throws: ServletException
if a servlet error occurred
Overrides:
init in class GenericServlet
 o getServletInfo
  public String getServletInfo()
Returns the information of FtpProxyServlet.
Overrides:
getServletInfo in class GenericServlet
 o service
  public void service(HttpServletRequest req,
                      HttpServletResponse res) throws ServletException, IOException
Services a single ftp request over http protocol.
Parameters:
req - the http request
res - the servlet response
Throws: ServletException
a servlet exception has occurred
Throws: IOException
an IO exception has occurred
Overrides:
service in class HttpServlet

All Packages  Class Hierarchy  This Package  Previous  Next  Index