Class sun.server.http.CgiServlet
All Packages Class Hierarchy This Package Previous Next Index
Class sun.server.http.CgiServlet
java.lang.Object
|
+----java.servlet.GenericServlet
|
+----java.servlet.http.HttpServlet
|
+----sun.server.http.CgiServlet
- public class CgiServlet
- extends HttpServlet
A class used by Java http server to run cgi-scripts.
Implements the CGI/1.1 interface.
Eventually we would like all the cgi-scripts to be replaced by servlets.
This class is provided for people who want to run existing cgi programs.
-
CgiServlet()
- Creates a new CGI servlet.
-
getServletInfo()
- Returns a string containing information about the author, version,
and copyright of the servlet.
-
init(ServletStub)
- Initializes the CGI servlet.
-
sendResponse(String[], String[], HttpServletRequest, HttpServletResponse)
- Execute the specified cgi script, parse its headers,
and pass it's response back to the client.
-
service(HttpServletRequest, HttpServletResponse)
- Services a single CGI-BIN request from the client.
CgiServlet
public CgiServlet()
- Creates a new CGI servlet.
init
public void init(ServletStub stub) throws ServletException
- Initializes the CGI servlet.
- Overrides:
- init in class GenericServlet
service
public void service(HttpServletRequest req,
HttpServletResponse res) throws ServletException, IOException
- Services a single CGI-BIN request from the client.
- Parameters:
- req - the HTTP request
- req - the HTTP response
- Throws: IOException
- If an I/O error has occurred.
- Overrides:
- service in class HttpServlet
sendResponse
public void sendResponse(String command[],
String envp[],
HttpServletRequest req,
HttpServletResponse res) throws IOException
- Execute the specified cgi script, parse its headers,
and pass it's response back to the client.
- Parameters:
- command - the cgi script to execute
- envp - the environment variables to give the cgi script
- req - the HTTP request
- res - teh HTTP response
getServletInfo
public String getServletInfo()
- Returns a string containing information about the author, version,
and copyright of the servlet.
- Overrides:
- getServletInfo in class GenericServlet
All Packages Class Hierarchy This Package Previous Next Index