1 Webware's CGI adapter:
2
3 Copy the Webware/WebKit/Adapters/WebKit.cgi file to your CGI directory (eg.
4 /home/httpd/cgi-bin), then add a line like this to httpd.conf:
5
6 ScriptAlias /webkit "/home/httpd/cgi-bin/WebKit.cgi"
7
8 --------
9
10 For Webware releases beyond 0.8.1:
11
12 WebStack applications are supported as contexts within WebKit, meaning that a
13 certain prefix in the URL determines whether an application is sent a
14 particular request.
15
16 Each context must be defined in the Webware/WebKit/Configs/Application.config
17 file within the 'Contexts' dictionary entry; for example:
18
19 'Simple': '/home/paulb/Software/Python/WebStack/examples/Webware/SimpleContext',
20
21 Note that the path to the context directory must be absolute, although the
22 context directory may reside within WebKit itself such that the path may then
23 make use of the special %(WebKitPath)s substitution.
24
25 Running the application server:
26
27 Change into the WebKit directory within Webware. Then, specifying the
28 appropriate PYTHONPATH, invoke the application server. For example:
29
30 PYTHONPATH=../../../WebStack:../../../WebStack/examples/Common ./AppServer
31
32 The WebStack package must reside on the PYTHONPATH, along with the package
33 containing the application itself.
34
35 --------
36
37 For Webware 0.8.1 or earlier:
38
39 Support for WebStack applications is provided by a Webware plug-in which
40 associates Webware resources having certain suffixes with certain WebStack
41 applications, regardless of the context within which a resource appears. In
42 order to make use of such a scheme, a WebStack application would have its
43 resources residing in an arbitrary URL "hierarchy", but with each resource
44 having the special suffix to indicate that it belongs to that application.
45
46 In the case of an application whose chosen suffix is ".xyz", it would be
47 possible, for example, to define resources residing at the following URL
48 paths:
49
50 tasks/my-tasks.xyz
51 tasks/outstanding/urgent.xyz
52 agenda/today.xyz
53
54 This is somewhat counter-intuitive to typical Webware concepts, and it is
55 recommended that Webware releases beyond 0.8.1 are used together with the
56 appropriate WebStack context mechanisms instead of using this plug-in scheme.
57
58 In order to support such behaviour, the patches in the
59 WebStack/patches/Webware/WebKit directory must be applied to WebKit:
60
61 cd Webware/WebKit
62 patch -p0 < ../../WebStack/patches/Webware/WebKit/Application.py-0.8.1.diff
63 patch -p0 < ../../WebStack/patches/Webware/WebKit/HTTPRequest.py-0.8.1.diff
64
65 Each plug-in, representing a WebStack application, should be visible in the
66 Webware root directory. A symbolic link can be used to make each example
67 appear; the Simple application being installed as follows:
68
69 cd Webware
70 ln -s ../WebStack/examples/Webware/SimpleApp
71
72 Running the application server:
73
74 Change into the WebKit directory within Webware. Then, specifying the
75 appropriate PYTHONPATH, invoke the application server. For example:
76
77 PYTHONPATH=../../WebStack:../../WebStack/examples/Common ./AppServer
78
79 The WebStack package must reside on the PYTHONPATH, along with the package
80 containing the application itself.