Wapp

Diff
Login

Differences From Artifact [d44a9f0b2b]:

To Artifact [0e7eb48ca6]:


1
2
3
4

5
6
7
8
9
10



11
12

13
14
15
16
17
18
19
1
2
3

4
5
6
7



8
9
10
11

12
13
14
15
16
17
18
19



-
+



-
-
-
+
+
+

-
+







Hello World
===========

Here is a "Hello, World!" web application written using Wapp:
Here is a "Hello, World!" web application written using W3:

>
    #!/usr/bin/tclsh
    package require wapp
    proc wapp-default {} {
      wapp-subst {<h1>Hello, World!</h1>\n}
    package require w3
    proc w3-default {} {
      w3-subst {<h1>Hello, World!</h1>\n}
    }
    wapp-start $argv
    w3-start $argv

To run this application using the built-in web-server, store the code above
in a file (here we use the name "hello.tcl") and do:

>
    tclsh hello.tcl

30
31
32
33
34
35
36
37

38
39
40


41
42
43
44


45
46

47
30
31
32
33
34
35
36

37
38


39
40
41
42


43
44
45

46
47







-
+

-
-
+
+


-
-
+
+

-
+


To run the application as CGI, make the hello.tcl file executable and
move it into the appropriate directory of the web server.

Further Information
-------------------

  *  [Introduction To Writing Wapp Applications](/doc/trunk/docs/intro.md)
  *  [Introduction To Writing W3 Applications](/doc/trunk/docs/intro.md)
  *  [Quick Reference](/doc/trunk/docs/quickref.md)
  *  [Wapp Parameters](/doc/trunk/docs/params.md)
  *  [Wapp Commands](/doc/trunk/docs/commands.md)
  *  [W3 Parameters](/doc/trunk/docs/params.md)
  *  [W3 Commands](/doc/trunk/docs/commands.md)
  *  [URL Mapping](/doc/trunk/docs/urlmapping.md)
  *  [Security Features](/doc/trunk/docs/security.md)
  *  [How To Compile wapptclsh - Or Not](/doc/trunk/docs/compiling.md)
  *  [Limitations of Wapp](/doc/trunk/docs/limitations.md)
  *  [How To Compile w3tclsh - Or Not](/doc/trunk/docs/compiling.md)
  *  [Limitations of W3](/doc/trunk/docs/limitations.md)
  *  [Example Applications](/file/examples)
  *  [Real-World Uses Of Wapp](/doc/trunk/docs/usageexamples.md)
  *  [Real-World Uses Of W3](/doc/trunk/docs/usageexamples.md)
  *  [Debugging Hints](/doc/trunk/docs/debughints.md)