Java Web Server 2.0  

Setting Up Multiple CGI Directories


Documentation Contents / Documentation Index / Glossary / Administration Tool Help

This document provides instructions for configuring the Web Serve for multiple cgi-bin directories.

To Add the Servlet to the Web Server:

  1. Log in to the Administration Tool.
  2. Select the service for which you wish to configure the multiple CGI directories.
  3. Click Manage.
  4. On the Service screen, click Servlets.
  5. On the Servlets panel, click Add.
  6. In the Servlet Name field, type the new name for the cgi servlet.
    This is the name by which the servlet will be called to handle the new cgi-bin directory (for example, cgi1).
  7. In the Servlet Class field, type com.sun.server.http.servlet.CgiServlet.

For more information see, see the Administration Tool: Adding Servlets online help doc.

To Configure the Newly Added Servlet:

  1. On the Servlets panel, click Configure, then the name of the server.
    The Name and Servlet Class fields on the Configuration tabbed panel should have the same values as those you entered in the Adding Servlets screen in the previous procedure.
  2. Indicate whether you want the servlet loaded at server startup and/or what to manually load it now.
  3. Click the Properties tab and add a new property called "bindir" whose value is the full or relative path to the cgi-bin directory you want the server to use (for example, foo/cgi-bin/, which will be relative to server_root, the location of the installed Java Web Server.)

For more information, see the Administration Tool: Configuring Servlets online help doc.

To Set the Servlet Alias for the Appropriate cgi-bin Directory:

  1. Click Setup.
  2. In the Setup panel, select Servlet Aliases.
  3. For each new cgi-bin directory you created in the previous steps, set the servlet alias for the directory to call the appropriate cgi servlet.
    For example, if you added the servlet cgi1 with /foo/cgi-bin as its bindir property, then you'll want a call to /foo/cgi-bin/ to be aliased to the servlet cgi1.
  4. Click Save.

For more information, see the Administration Tool: Servlet Aliases online help doc.


Top
java-server-feedback@java.sun.com
Copyright © 1999 Sun Microsystems, Inc.
All Rights Reserved.