General Theory
NeoWebScript-SA is a standalone (hence "SA") webserver that is completely written in Tcl/Tk. It flows from the UNIX-based NeoWebScript that is based on the Apache Webserver, the world's most popular server. Unlike NeoWebScript, NeoWebScript-SA does not have any "C" code in it, other than platform-specific startup code. This means that portability issues are easier to resolve. To that end, we have developed NeoWebScript-SA on three major platforms: Unix, Windows, and the Macintosh.
When NeoWebScript-SA is started up, it loads in several files needed to
serve out documents, waits on a port, and begins logging requests. Once
a request arrives, it snaps into action--parsing out their request.
If the request is for an image, or some other type of data, it will simply
send it out according to to the HTTP specifications. If the request is for
an HTML file, though, it will first go through the file, looking for
NeoWebScripts. If it finds some, it will create an interpreter, load
all of the commands in conf/init.tcl
, and
conf/devel.tcl
into it, and evaluate the scripts. The results
are substituted in-line, and the request is finished.