wt.tools.javarmi
Class JavaRMIServlet

java.lang.Object
  extended byjavax.servlet.GenericServlet
      extended byjavax.servlet.http.HttpServlet
          extended bywt.tools.javarmi.JavaRMIServlet
All Implemented Interfaces:
Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public class JavaRMIServlet
extends javax.servlet.http.HttpServlet

This servlet acts as a gateway between the web server and the RMI-over-HTTP CGIHandler bridge class. It extends the standard HttpServlet provided with the JSDK. Only the doPost method is implemented, since the CGIHandler class only handles POST requests.

See Also:
CGIHandlerTS, Serialized Form

Field Summary
(package private) static boolean debug
           
(package private) static int maxPort
           
(package private) static int minPort
           
(package private) static InetAddress serverAddr
           
 
Fields inherited from class javax.servlet.http.HttpServlet
 
Fields inherited from class javax.servlet.GenericServlet
 
Constructor Summary
JavaRMIServlet()
           
 
Method Summary
 void destroy()
           
protected  void doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          This method handles the POST request and forwards it to the CGIHandler class.
 void init(javax.servlet.ServletConfig config)
           
protected  void invokeCGIHandler(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Invokes the CGI handler with a list of properties and appropriate I/O streams.
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doGet, doHead, doOptions, doPut, doTrace, getLastModified, service, service
 
Methods inherited from class javax.servlet.GenericServlet
getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serverAddr

static InetAddress serverAddr

minPort

static int minPort

maxPort

static int maxPort

debug

static boolean debug
Constructor Detail

JavaRMIServlet

public JavaRMIServlet()
Method Detail

init

public void init(javax.servlet.ServletConfig config)
          throws javax.servlet.ServletException
Throws:
javax.servlet.ServletException

doPost

protected void doPost(javax.servlet.http.HttpServletRequest request,
                      javax.servlet.http.HttpServletResponse response)
               throws IOException,
                      javax.servlet.ServletException
This method handles the POST request and forwards it to the CGIHandler class.

Parameters:
request - The HttpServletRequest provided by the server.
response - The HttpServletResponse provided by the server.
Throws:
javax.servlet.ServletException - If a servlet exception occurred.
IOException - If an I/O exception occurred.

invokeCGIHandler

protected void invokeCGIHandler(javax.servlet.http.HttpServletRequest request,
                                javax.servlet.http.HttpServletResponse response)
                         throws IOException
Invokes the CGI handler with a list of properties and appropriate I/O streams.

Parameters:
request - The HttpServletRequest provided by the server.
response - The HttpServletResponse provided by the server.
Throws:
IOException - If an I/O exception occurred.

destroy

public void destroy()