NaviServer - programmable web server
4.99  5.0

[ Main Table Of Contents | Table Of Contents | Keyword Index ]

tcl-lib-file(n) 4.99.30 manual "NaviServer Manual"

Name

tcl-lib-file - Support for .tcl-style dynamic pages

Table Of Contents

Description

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.

See Also

adp-overview, nsd

Keywords

NaviServer, configuration, fastpath, pagedir