Main ✸ Source Code ✸ Downloads ✸ API Documentation ✸ Mailing Lists ✸ Bugs ✸ Developers
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:
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