All resources All frames

# CgiFrame

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.

## Inerits

The CgiFrame class inerits from the following classes:

- Resource
- FramedResource
- ResourceFrame
- ProtocolFrame
- HTTPFrame

## Attributes description

The CgiFrame defines the following attributes:

- interpreter
- command
- noheader
- generates-form
- remote-host
- cgi-debug

`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 an editable StringAttribute
default value
  This attribute defaults to null.

`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 an editable StringArrayAttribute
default value
  This attribute defaults to null.

`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 an 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, 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 an editable BooleanAttribute
default value
  This attribute defaults to true.

`remote-host`

semantics
  If turned on, this flag will enable the REMOTE_HOST env var computation.
type
  This attribute is an editable BooleanAttribute
default value
  This attribute defaults to null.

`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 an editable BooleanAttribute
default value
  This attribute defaults to false.

Jigsaw Team
$Id: org.w3c.jigsaw.frames.CgiFrame.html,v 1.3 1998/03/27 08:19:05 bmahe Exp $