1.1 --- a/docs/Webware/NOTES.txt Sat Feb 07 23:39:19 2004 +0000
1.2 +++ b/docs/Webware/NOTES.txt Sat Feb 07 23:41:18 2004 +0000
1.3 @@ -1,10 +1,76 @@
1.4 -Each application is represented by a Webware plug-in which should be visible
1.5 -in the Webware root directory. A symbolic link can be used to make each
1.6 -example appear; the Simple application being installed as follows:
1.7 +Webware's CGI adapter:
1.8 +
1.9 +Copy the Webware/WebKit/Adapters/WebKit.cgi file to your CGI directory (eg.
1.10 +/home/httpd/cgi-bin), then add a line like this to httpd.conf:
1.11 +
1.12 +ScriptAlias /webkit "/home/httpd/cgi-bin/WebKit.cgi"
1.13 +
1.14 +--------
1.15 +
1.16 +For Webware releases beyond 0.8.1:
1.17 +
1.18 +WebStack applications are supported as contexts within WebKit, meaning that a
1.19 +certain prefix in the URL determines whether an application is sent a
1.20 +particular request.
1.21 +
1.22 +Each context must be defined in the Webware/WebKit/Configs/Application.config
1.23 +file within the 'Contexts' dictionary entry; for example:
1.24 +
1.25 +'Simple': '/home/paulb/Software/Python/WebStack/examples/Webware/SimpleContext',
1.26 +
1.27 +Note that the path to the context directory must be absolute, although the
1.28 +context directory may reside within WebKit itself such that the path may then
1.29 +make use of the special %(WebKitPath)s substitution.
1.30 +
1.31 +Running the application server:
1.32 +
1.33 +Change into the WebKit directory within Webware. Then, specifying the
1.34 +appropriate PYTHONPATH, invoke the application server. For example:
1.35 +
1.36 +PYTHONPATH=../../../WebStack:../../../WebStack/examples/Common ./AppServer
1.37 +
1.38 +The WebStack package must reside on the PYTHONPATH, along with the package
1.39 +containing the application itself.
1.40 +
1.41 +--------
1.42 +
1.43 +For Webware 0.8.1 or earlier:
1.44 +
1.45 +Support for WebStack applications is provided by a Webware plug-in which
1.46 +associates Webware resources having certain suffixes with certain WebStack
1.47 +applications, regardless of the context within which a resource appears. In
1.48 +order to make use of such a scheme, a WebStack application would have its
1.49 +resources residing in an arbitrary URL "hierarchy", but with each resource
1.50 +having the special suffix to indicate that it belongs to that application.
1.51 +
1.52 +In the case of an application whose chosen suffix is ".xyz", it would be
1.53 +possible, for example, to define resources residing at the following URL
1.54 +paths:
1.55 +
1.56 + tasks/my-tasks.xyz
1.57 + tasks/outstanding/urgent.xyz
1.58 + agenda/today.xyz
1.59 +
1.60 +This is somewhat counter-intuitive to typical Webware concepts, and it is
1.61 +recommended that Webware releases beyond 0.8.1 are used together with the
1.62 +appropriate WebStack context mechanisms instead of using this plug-in scheme.
1.63 +
1.64 +In order to support such behaviour, the patches in the
1.65 +WebStack/patches/Webware/WebKit directory must be applied to WebKit:
1.66 +
1.67 +cd Webware/WebKit
1.68 +patch -p0 < ../../WebStack/patches/Webware/WebKit/Application.py-0.8.1.diff
1.69 +patch -p0 < ../../WebStack/patches/Webware/WebKit/HTTPRequest.py-0.8.1.diff
1.70 +
1.71 +Each plug-in, representing a WebStack application, should be visible in the
1.72 +Webware root directory. A symbolic link can be used to make each example
1.73 +appear; the Simple application being installed as follows:
1.74
1.75 cd Webware
1.76 ln -s ../WebStack/examples/Webware/Simple
1.77
1.78 +Running the application server:
1.79 +
1.80 Change into the WebKit directory within Webware. Then, specifying the
1.81 appropriate PYTHONPATH, invoke the application server. For example:
1.82