WWW Server
Overview
This goody implements a Web Server with additional functionality
In addition to serving HTTP file requests, this server allows for
smalltalk applications to register themself as request handlers,
and thereby generating HTML responses dynamically (i.e. programmatically).
This dynamic HTML may be either generated directly by a smalltalk
object, or by executing embedded smalltalk found in a file document.
The HTTPServer consist of a merged functionality from the original ST/X
server and the PWS (pluggable web server) code as provided with the Squeak Swiki:
- file access via a configurable root directory
- multiple virtual roots
- configurable file caching
- keep alive connections
- various server actions (from PWS)
These include:
- editable pages (everyone may edit)
- authorized pages (edit by authorized people only)
- embedded smalltalk pages
- pluggable applications
- temporary graphic links
Documentation
See the documentation methods in HTTPServer;
Especially:
HTTPServer howToStart.
HTTPServer howToConfigure.
And, use the source - Luke.
Examples
Start up the HTTPserver (see the launchers communications-settings dialog),
and your favourite browser.
The server may also be started programmatically, by evaluating:
HTTPServer startServer
or:
HTTPServer startServerOnPort:aPortNumber
Notice, that the HTTPServer cannot usually serve on the default HTTP port
(80), because this is a system port, which cannot be served by non-priviledged
users. Therefore, the default port is 8080, which is a non-priviledged port
(you must make ST/X a setuid-root program, in order to allow serving the
priviledged port).
Do not forget to enter the correct port number in the browser
(i.e. enter the URL "http://hostname:port/").
The default page includes links to demonstrate various features of the
server:
- program generated pages
(the homepage and server admin-pages are generated by the HTTPServer itself)
- file access
(the online documentation pages)
- application generated pages
(the process-list and browser page)
- plugged-in serverAction pages
(the SWIKI pages)
In addition, the demonstration homePage includes links
to an authorizedWrite Swiki (anyone can read, but editing requires
authorization) and a Swiki which includes embedded smalltalk actions
(this is also protected via authentication).
These two swikis are disabled by default, and must be enabled by executing
HTTPServer setupSecureSwiki.
HTTPServer setupAuthorizedSwiki.
Licensing
This addOn package is NOT to be considered part of the base ST/X system.
It is provided physically with the ST/X delivery, but only for your
convenience.
Legally, it is a freeware or public domain goody, as specified in
the goodies copyright notice (see the goodies source).
No Warranty
This goody is provided AS-IS without any warranty whatsoever.
Origin/Authors
HTTPServer is a merge of the original file-based ST/X httpServer
and the PWS (Pluggable Web Server) as provided by Squeak developers.
Authors:
Squeak (PWS and ServerAction hierarchy))
Claus Gittinger (original HTTPServer, file access, caching & keepAlive)
<info@exept.de>
Doc $Revision: 1.8 $