The WebDataServer configuration file must be named WebDS.cfg and must be in the same folder as the WebDataServer.acgi application. The parmeters in the configuration file control the operation of the application. Parameters which effect the results returned from the the application, can be overridden by inputs from the client form. To override, create an input field in the form with the same name as the configuration parameter. The value of the passed parameter will be used instead of the value in the configuration file. Note that the override is a one time event - the configuration value does not change permanently.

The following table summarizes the configuration file parameters:
ParameterOverridableApplies to DataSetsSample Value
cgiPathNoNo/DataServer/WebDataServer.acgi
QuitNoteNoNoQUIT ASAP!
DataDelimeterNoYes,
DataFileNoYesMyDataFile.txt
DataSetYes & NoYesMovies
HeadFileYesYesMyHead.html
BodyFileYesYesMyBody.html
FootFileYesYesMYFoot.html
MaxReturnYesYes100
MaxMaxReturnNoYes200
ReturnMoreYesYesTrue
SortFieldYesYesLastName
RequiredNoYesLastName


More about the configuration parameters

cgiPath
The cgiPath is the UNIX style pathname of the WebDataServer.acgi application, relative to WebStar. It is used in the ACTION attribute of the HTML FORM tag when the 'More' button is included in results. Note that the same value should be in the ACTION attribute in your forms.

QuitNote
Any form input parameter with this value will cause the application to quit. This can be useful if you need to force the application to quit to enable an upload of files. Give an empty value is you want to disallow forced quits.

DataSet
This causes WebDataServer to create a new data set named with the given value. Subsequent config parameters will apply to this dataset. If you want to name the first data set then the very first line in the config file must be a DataSet parameter, otherwise a new data set is created whenever a DataSet parameter is encountered. Forms can specify which data set they apply to by including a DataSet input whose value exactly (case sensitive) matches the name of one of the DataSets. If no data set is specified in a form then the first data set is used.

DataDelimeter
DataDelimeter is the character which delimits fields in data files. It must appear before the DataFile parameter. If it does not, tab will be used to delimit the data file. To set the DataDelimiter to tab set its value to \t as in the example below.

DataFile
Data records are read from DataFile. The first line of the first data file should have the field names. There may be multiple DataFile values for a dataset, but only the first one's file should have the field names. All subsequent files are assumed to have the same fields.

HeadFile
This is the Mac path name for the header template file. See the templates documentation for more information on its use. If the template is in the same location as WebDataServer.acgi then you can just give the file name.

BodyFile
This is the Mac path name for then body template file. See the templates documentation for more information on its use. If the template is in the same location as WebDataServer.acgi then you can just give the file name.

FootFile
This is the Mac path name for then footer template file. See the templates documentation for more information on its use. If the template is in the same location as WebDataServer.acgi then you can just give the file name.

MaxReturn
Generally you will want to limit the number of matching records returned to the user at one time. MaxReturn is that limit.

MaxMaxReturn
MaxMaxReturn sets an upper bound on overrides of MaxReturn. Setting a MaxMaxReturn enables you to prevent someone from creating a fake form which accesses all your data at once. If there is no MaxMaxReturn config parameter then there is no upper bound on MaxReturn overrides.

ReturnMore
When there are more than MaxReturn matching records and ReturnMore is True, a 'More' button is included in the results. When the end user clicks on the 'More' button the next set of matching rows is sent.

SortField
List of matching records that is returned to the user is sorted by this field. By using radio button form inputs named SortField whose values are the names of fields, you can allow the user to select how the results are sorted. If no sort field is specified in the config file and there is no SortField form input then the first field with a name that does not begin with an underscore is used for sorting the results.

Required
The required config parameter contains a name which is matched against the name of form input parameter. The no matching input parameter is found or the matching input parameter has no value, then an error message is returned to the web user.

A value can also be specified with the Required config parameter. In this case the matching input parameter must a have value which matches the config parameter value. This enables you to limit the available search criteria for a field.

Full sample configuration file:
cgiPath=/DataServer/WebDataServer.acgi
QuitNote=PLEASE QUIT!
DataDelimeter=\t
DataFile=presidents.txt
//The following can be overridden via form inputs of the same name
HeadFile=preshead.html
BodyFile=presbody.html
BodyFile=presfoot.html
MaxReturn=20
ReturnMore=True
Required=Name
Required=NameCrit=starts with