The following table summarizes the configuration file parameters:
Parameter | Overridable | Applies to DataSets | Sample Value |
---|---|---|---|
cgiPath | No | No | /DataServer/WebDataServer.acgi |
QuitNote | No | No | QUIT ASAP! |
DataDelimeter | No | Yes | , |
DataFile | No | Yes | MyDataFile.txt |
DataSet | Yes & No | Yes | Movies |
HeadFile | Yes | Yes | MyHead.html |
BodyFile | Yes | Yes | MyBody.html |
FootFile | Yes | Yes | MYFoot.html |
MaxReturn | Yes | Yes | 100 |
MaxMaxReturn | No | Yes | 200 |
ReturnMore | Yes | Yes | True |
SortField | Yes | Yes | LastName |
Required | No | Yes | LastName |
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.
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 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.
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.
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.
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.
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.
Generally you will want to limit the number of matching records returned to the user at one time. MaxReturn is that limit.
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.
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.
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.
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.
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 |