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 Note also that the name of the context (eg. 'simple') must not be the same as
26 the name of any other package used within the application (and possibly any
27 other applications in the application server), with the only reasonable
28 exception being the context package name itself (eg. 'SimpleContext').
29 Otherwise, the existing package will become overridden by the contents of the
30 context itself. Therefore, given that the Simple package is used to hold the
31 actual application code, it is not wise to use 'Simple' as the context name.
32
33 Running the application server:
34
35 Change into the WebKit directory within Webware. Then, specifying the
36 appropriate PYTHONPATH, invoke the application server. For example:
37
38 PYTHONPATH=../../../WebStack:../../../WebStack/examples/Common ./AppServer
39
40 The WebStack package must reside on the PYTHONPATH, along with the package
41 containing the application itself.
42
43 --------
44
45 For Webware 0.8.1 or earlier:
46
47 Support for WebStack applications is provided by a Webware plug-in which
48 associates Webware resources having certain suffixes with certain WebStack
49 applications, regardless of the context within which a resource appears. In
50 order to make use of such a scheme, a WebStack application would have its
51 resources residing in an arbitrary URL "hierarchy", but with each resource
52 having the special suffix to indicate that it belongs to that application.
53
54 In the case of an application whose chosen suffix is ".xyz", it would be
55 possible, for example, to define resources residing at the following URL
56 paths:
57
58 tasks/my-tasks.xyz
59 tasks/outstanding/urgent.xyz
60 agenda/today.xyz
61
62 This is somewhat counter-intuitive to typical Webware concepts, and it is
63 recommended that Webware releases beyond 0.8.1 are used together with the
64 appropriate WebStack context mechanisms instead of using this plug-in scheme.
65
66 In order to support such behaviour, the patches in the
67 WebStack/patches/Webware/WebKit directory must be applied to WebKit:
68
69 cd Webware/WebKit
70 patch -p0 < ../../WebStack/patches/Webware/WebKit/Application.py-0.8.1.diff
71 patch -p0 < ../../WebStack/patches/Webware/WebKit/HTTPRequest.py-0.8.1.diff
72
73 Each plug-in, representing a WebStack application, should be visible in the
74 Webware root directory. A symbolic link can be used to make each example
75 appear; the Simple application being installed as follows:
76
77 cd Webware
78 ln -s ../WebStack/examples/Webware/SimpleApp
79
80 Running the application server:
81
82 Change into the WebKit directory within Webware. Then, specifying the
83 appropriate PYTHONPATH, invoke the application server. For example:
84
85 PYTHONPATH=../../WebStack:../../WebStack/examples/Common ./AppServer
86
87 The WebStack package must reside on the PYTHONPATH, along with the package
88 containing the application itself.