Support for .tcl-style dynamic pages - Setting up a TCL error page
TABLE OF CONTENTS
DESCRIPTION
Support for .tcl-style dynamic pages via ADP engine
SEE ALSO
KEYWORDS
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
|
Another way to support .tcl pages to use ADP engine to process .tcl file as ADP pages. the engine will source Tcl file and wrap it as <% ns_adp_include filename %>, then compiled it as regular ADP page. If caching enabled, the tcl file will be compiled as Tcl proc into bytecode. Using ADP engine is faster than using file.tcl based approach.
ns_section "ns/server/${servername}/adp"
ns_param enabletclpages false ;# Parse *.tcl files in pageroot.
ns_param errorpage ${serverdir}/${pageroot}/errorpage.adp ;# ADP error page
|