[http://naviserver.sourceforge.net/ns_logobig.gif] [NaviServer%|%Main%|%] ✸ http://bitbucket.org/naviserver/naviserver/%|%Source Code %|% ✸ http://sourceforge.net/project/showfiles.php?group_id=130646%|%Downloads %|% ✸ http://naviserver.sourceforge.net/n/toc.html%|%API Documentation %|% ✸ http://sourceforge.net/mail/?group_id=130646%|%Mailing Lists%|% ✸ http://sourceforge.net/tracker/?group_id=130646&atid=719006%|%Bugs %|% ✸ https://www.ohloh.net/p/naviserver/contributors%|%Developers %|% ---- **Support for .tcl-style dynamic pages** file.tcl is responsible for setting up all that's necessary for allowing you to use TCL files in your webserver directories. Notice the entries in your sample-config.tcl configuration file: ns_section "ns/server/${servername}" ns_param directoryfile $directoryfile ns_param pageroot $serverdir/$pageroot ns_param enabletclpages false ;# Parse *.tcl files in pageroot. ns_param filecachesize 5000000 The default is to not enable TCL pages. If you set this to true this is what happens at server startup when file.tcl is sourced: 1. The procedure ns_sourceproc is registered for the HTTP methods GET, POST and HEAD via ns_register_proc. 2. Caching TCL-bytecode is supported: 1. It looks for a configuration parameter filecachesize for the size of the cache.(You can add this to the config lines above) 2. If not found the Cache Size defaults to nearly 5 MB 3. A procedure ns_sourcefile is created with special code to handle caching and flushing. 3. The procedure ns_sourceproc works as follows: 1. If a requested file does not exist on the filesystem it returns via ns_returnnotfound 2. An existing TCL file is sourced via ns_sourcefile (see above) 3. If a custom error page exists it is sourced. That error page is responsible for handling the error, e.g. communication with a user. ***Setting up a TCL error page*** Similar to the ADP error page example in your sample-config.tcl file you could setup a TCL error page: ns_section "ns/server/${servername}/tcl" ns_param errorPage ${serverdir}/${pageroot}/errorpage.tcl ;# TCL error page <> NaviServer