W3C logoJigsaw

CGI scripts

They are two ways to setup CGI scripts. The manual way requires that you describe each script to the
server. Let's say your script's path relative to the server root is WWW/cgi-bin/myscript. You will first have to create an appropriate org.w3c.tools.resources.FileResource with a org.w3c.jigsaw.frames.CgiFrame instance to wrap your script. See this tutorials to know how to create a resource in Jigsaw.

Then edit the newly created resource, and setup it's command line (the command line the server will use to run your script). Each line of the text field should represent one argument, the first one being the script full path.

You can also register files of a given extension as scripts, by using a specialized indexer.  When required, you can even specify the interpreter to be run to execute the script (for example perl scripts).
CGI configuration
In this sample the CGI script is a perl script, as you can see the interpreter location must be specified (in the Interpreter field). Read the CgiFrame reference page for more details on CgiFrame configuration.


Jigsaw Team
$Id: cgi.html,v 1.5 1998/11/17 09:40:06 bmahe Exp $

Copyright  ©  1997 W3C (MIT, INRIA, Keio ), All Rights Reserved. W3C liability, trademark, document use and software licensing rules apply. Your interactions with this site are in accordance with our public and Member privacy statements.