Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.enhydra.servlet.servlets
Class CGIServlet  view CGIServlet download CGIServlet.java

java.lang.Object
  extended byjavax.servlet.GenericServlet
      extended byjavax.servlet.http.HttpServlet
          extended byorg.enhydra.servlet.servlets.CGIServlet
All Implemented Interfaces:
java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public class CGIServlet
extends javax.servlet.http.HttpServlet

This Servlet is for the purpose of executing a CGI program that resides on the system. In order to use this servlet in the Multiserver please remember to specify the fully qualified classname org.enhydra.servlet.servlets.CGIServlet in the Classname field and specify the directory of the CGI to run in the DocRoot field.

Version:
$Revision: 1.4.2.2.2.1 $

Field Summary
 
Fields inherited from class javax.servlet.http.HttpServlet
 
Fields inherited from class javax.servlet.GenericServlet
 
Constructor Summary
CGIServlet()
           
 
Method Summary
private  boolean isAuthorized(java.lang.String path)
          Test if a path is authorized.
 void service(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Overide the service method of HttpServelet.
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service
 
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CGIServlet

public CGIServlet()
Method Detail

service

public void service(javax.servlet.http.HttpServletRequest request,
                    javax.servlet.http.HttpServletResponse response)
             throws javax.servlet.ServletException,
                    java.io.IOException
Overide the service method of HttpServelet. This method executes a CGI program that is specified on the URL line of a browser.


isAuthorized

private boolean isAuthorized(java.lang.String path)
Test if a path is authorized. Currently the only limitations are that the pathname must not contain "..".