PATH  WebObjects 4.0 Documentation > What's New in WebObjects 4.0

Table of Contents Previous Section

"Serverless" Applications

WebObjects 4.0 applications can receive HTTP requests directly. Previously, a web server had to be running to receive HTTP requests and to forward them through the WebObjects adaptor.

To run a WebObjects application when no HTTP server is present, you simply specify the number of the port where the application should receive requests using the WOPort option. By default, WOPort is -1, which assigns an arbitrary high port number to the application. Thus, if you specify no port number at all, you can still run your application without a web server.

This new feature has several advantages:

Note that if you do want to use a web server to test WebObjects examples, you can still do so. Before you do, do a "make install" to install the example's web server resources (such as image files and Java client-side classes) in the document root, just as you do when installing a WebObjects application. If you put your application in a directory other than "WebObjects" under your document root, set the WOApplicationBaseURL option to the .woa directory's path relative to the document root (WOApplicationBaseURL is set to /WebObjects by default). If you don't perform these steps, the web server won't be able to find web server resources; when you run the application, you'll see broken images, and client-side classes won't be loaded. (See Rapid Turnaround Mode for more on developing with and without a web server.)

Table of Contents Next Section