1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
-
+
+
+
-
-
+
-
-
-
-
-
|
# This script is a template used for testing.
#
# After making modifications to this script to test out bits of HTML
# (or not - the script works fine as it is), invoke the script using
#
# wapptclsh env.tcl
#
# All web pages show the CGI environment.
# All web pages show the Wapp execution environment, which includes
# CGI-line environment variables, decoded query and POST parameters, and
# decoded cookies.
#
package require wapp
proc wapp-default {} {
global wapp
wapp-trim {
<h1>Wapp Environment</h1>
<pre>
<pre>%html([wapp-debug-env])</pre>
}
foreach var [lsort [dict keys $wapp]] {
if {[string index $var 0]=="."} continue
wapp-subst {%html($var) = %html([list [dict get $wapp $var]])\n}
}
wapp-subst {</pre>\n}
}
wapp-start $argv
|