W3C Jigsaw
All Resources All filters

CgiResource

This resource class runs CGI scripts, conforming to the CGI/1.1 specification. You can use it as an extension template, to get automatic indexing of your CGI scripts, based on their extension.

It also has a special interpreter attribute that makes running scripts on Windows easy to configure, and somwhow more efficient then you could expect.


Inherits

The CgiResource class inherits from the following classes:


Attributes description

The CgiResource defines the following attributes:


command
semantics
The command to launch in order to run the CGI script. This should provide the full pat hto the executable script. Each entry of the (String) array gives is passed as an extra argument to the script, the first one being (by convention) the full script's path.
type
This attribute is a editable StringArrayAttribute.
default value
This attribute defaults to the full file name of the resource.


interpreter
semantics
Some operating systems don't support the nice UNIX feature !# that allows UNIX to launch the appropriate interpreter for the appropriate script. This attribute allows the CgiResource to be configured to use a certain interpreter to interpret the script pointed to by the command attribute.
By using this attribute in the predefined extensions, you can state that on Windows boxes, all .pl files are to be exported by the CgiResource, with default interpreter /Perl/bin/perl.exe. This will allow you to automatically index cgi scripts.
type
This attribute is a editable StringAttribute.
default value
This attribute has no default value.


noheader
semantics
Will the script emits its one headers, or should Jigsaw emit them. Classical CGI scripts will usually not emit any headers, so it is up to their hosting server to emit them. However, in some situation (server push, for example), the script might prefer to emit its own set of headers.
When this flag is set to true it is up to the script to emit the headers, otherwise, the server will do it. 
type
This attribute is a editable BooleanAttribute.
default value
This attribute defaults to false.


generates-form
semantics
Should the script be used to generate the form to be filled-in ? This resource allows you to put your form in a file (since it inherits from the FileResource), instead of having to launch the script to generate it. For compatibilty, this flags is turned to false by default, although, the second alternative (having the form in a separate file) will probably be much (much) more efficient.
type
This attribute is a editable BooleanAttribute.
default value
This attribute defaults to false.


cgi-debug
semantics
Turns debug on for that script. This nifty feature allow you to debug your script, by emitting a document containing the script output, instead of letting the script generates the document. The returned document will be of content type text/plain.
type
This attribute is a editable BooleanAttribute.
default value
This attribute defaults to false.


Jigsaw Team
$Id: w3c.jigsaw.forms.CgiResource.html,v 1.1 1996/04/29 23:36:22 abaird Exp $