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.
-
FtpProxyServlet()
- Creates a new instance of FtpProxyServlet.
-
getServletInfo()
- Returns the information of FtpProxyServlet.
-
init(ServletStub)
- Initializes the FtpProxyServlet.
-
service(HttpServletRequest, HttpServletResponse)
- Services a single ftp request over http protocol.
FtpProxyServlet
public FtpProxyServlet()
- Creates a new instance of FtpProxyServlet.
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
getServletInfo
public String getServletInfo()
- Returns the information of FtpProxyServlet.
- Overrides:
- getServletInfo in class GenericServlet
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