tcl-lib-file - Support for .tcl-style dynamic pages
When a client requests a page, the page can be a static or dynamic, where the latter means that the content is computed at the time it is served. Dynamic content can be provided as .adp files or via .tcl files. We cover here just the .tcl files.
By default requests to files with the extension .tcl are served as plain files (i.e. showing the source code of the .tcl files). By setting the flag enabletclpages in the configuration file, NaviServer can be instructed to interpret such files when these are requested (Tcl pages). Notice the entries in your sample-config.tcl configuration file:
ns_section ns/server/${server}/adp { ns_param enabletclpages false ;# Parse *.tcl files in pagedir. }
When enabletclpages is activated, NaviServer registers upon startup for all files with the extension .tcl in the directory pagedir a handler to deliver these files as Tcl pages (using ns_register_tcl). The handler is registered for the HTTP methods GET, POST and HEAD.