au.com.lastweekend.cgi
Class CGIServlet

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by au.com.lastweekend.cgi.CGIServlet
All Implemented Interfaces:
java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public class CGIServlet
extends javax.servlet.http.HttpServlet

CGI Servlet.

init-params

  • resourceBase
  • ignoreExitState
  • bufferSize
  • ENV_*
  • resourceBase

    Set the base file system location for the servlet. See ServletContextResource

    ignoreExitState

    If "true", a non-zero exit status from the CGI process will be bypassed, otherwise a non-zero status will generate 500 error response. Default "false"

    ENV_*

    Any initParameter that starts with ENV_ is used to set an environment variable with the name stripped of the leading ENV_ and using the init parameter value. Particularly useful for "ENV_SystemRoot" on Windows, required for a number of system libraries (eg sockets) to work. "ENV_PATH" can also be useful. The CGIFactory class also takes initParameters

    TODO: Make the CGIHandler factory class an initParam

    Version:
    $Id: CGIServlet.java 122 2008-12-20 09:56:46Z lwoggardner $
    Author:
    Julian Gosnell, Thanassis Papathanasiou - Some minor modifications for Jetty6 port, Grant Gardner grant@lastweekend.com.au Heavily refactored to be non-Jetty specific
    See Also:
    Serialized Form

    Constructor Summary
    CGIServlet()
               
     
    Method Summary
     void init()
               
     void service(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
               
     
    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, 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

    init

    public void init()
              throws javax.servlet.ServletException
    Overrides:
    init in class javax.servlet.GenericServlet
    Throws:
    javax.servlet.ServletException

    service

    public void service(javax.servlet.http.HttpServletRequest req,
                        javax.servlet.http.HttpServletResponse res)
                 throws javax.servlet.ServletException,
                        java.io.IOException
    Overrides:
    service in class javax.servlet.http.HttpServlet
    Throws:
    javax.servlet.ServletException
    java.io.IOException


    Copyright © 2008. All Rights Reserved.