Extending Cascade HTTP

Server extensions allow you to extend the capabilities of the server by writing custom java classes to provide the functionality you need. Server extensions are much more efficient than traditional CGI scripts, in that they avoid the overhead of spawning a separate process to run each external programs.

Cascade HTTP server extensions are loaded on demand. This means that new classes can be added to an already running server.

Writing a Server Extension

To write a server extension, simply create a class that implements to uk.co.demon.cascade.http.HTTPServerExtension interface. This interface extends the Runnable interface: each server extension runs in its own thread.

You must also ensure that your new class can be found in the CLASSPATH that your server is using.

You can define which URLs map onto server extensions with the CLASSEXEC directive in the server configuration file.

This bit isn't very well documented yet. You can probably learn more by looking at the source, or see the example.