# HG changeset patch # User paulb # Date 1076197278 0 # Node ID c8b0faa5e076ad6c61812b04d3775a0e330abc1d # Parent bb2e62e8c41ef169b94094a473f29c309318cb6d [project @ 2004-02-07 23:41:18 by paulb] Added more documentation for Webware 0.8.1 and some new documentation for post-0.8.1 releases, along with a description of URL path naming under both kinds of Webware application servers. diff -r bb2e62e8c41e -r c8b0faa5e076 docs/Webware/NOTES.txt --- a/docs/Webware/NOTES.txt Sat Feb 07 23:39:19 2004 +0000 +++ b/docs/Webware/NOTES.txt Sat Feb 07 23:41:18 2004 +0000 @@ -1,10 +1,76 @@ -Each application is represented by a Webware plug-in which should be visible -in the Webware root directory. A symbolic link can be used to make each -example appear; the Simple application being installed as follows: +Webware's CGI adapter: + +Copy the Webware/WebKit/Adapters/WebKit.cgi file to your CGI directory (eg. +/home/httpd/cgi-bin), then add a line like this to httpd.conf: + +ScriptAlias /webkit "/home/httpd/cgi-bin/WebKit.cgi" + +-------- + +For Webware releases beyond 0.8.1: + +WebStack applications are supported as contexts within WebKit, meaning that a +certain prefix in the URL determines whether an application is sent a +particular request. + +Each context must be defined in the Webware/WebKit/Configs/Application.config +file within the 'Contexts' dictionary entry; for example: + +'Simple': '/home/paulb/Software/Python/WebStack/examples/Webware/SimpleContext', + +Note that the path to the context directory must be absolute, although the +context directory may reside within WebKit itself such that the path may then +make use of the special %(WebKitPath)s substitution. + +Running the application server: + +Change into the WebKit directory within Webware. Then, specifying the +appropriate PYTHONPATH, invoke the application server. For example: + +PYTHONPATH=../../../WebStack:../../../WebStack/examples/Common ./AppServer + +The WebStack package must reside on the PYTHONPATH, along with the package +containing the application itself. + +-------- + +For Webware 0.8.1 or earlier: + +Support for WebStack applications is provided by a Webware plug-in which +associates Webware resources having certain suffixes with certain WebStack +applications, regardless of the context within which a resource appears. In +order to make use of such a scheme, a WebStack application would have its +resources residing in an arbitrary URL "hierarchy", but with each resource +having the special suffix to indicate that it belongs to that application. + +In the case of an application whose chosen suffix is ".xyz", it would be +possible, for example, to define resources residing at the following URL +paths: + + tasks/my-tasks.xyz + tasks/outstanding/urgent.xyz + agenda/today.xyz + +This is somewhat counter-intuitive to typical Webware concepts, and it is +recommended that Webware releases beyond 0.8.1 are used together with the +appropriate WebStack context mechanisms instead of using this plug-in scheme. + +In order to support such behaviour, the patches in the +WebStack/patches/Webware/WebKit directory must be applied to WebKit: + +cd Webware/WebKit +patch -p0 < ../../WebStack/patches/Webware/WebKit/Application.py-0.8.1.diff +patch -p0 < ../../WebStack/patches/Webware/WebKit/HTTPRequest.py-0.8.1.diff + +Each plug-in, representing a WebStack application, should be visible in the +Webware root directory. A symbolic link can be used to make each example +appear; the Simple application being installed as follows: cd Webware ln -s ../WebStack/examples/Webware/Simple +Running the application server: + Change into the WebKit directory within Webware. Then, specifying the appropriate PYTHONPATH, invoke the application server. For example: