
|
The web server for the developer in a hurry... jhttpd is a Java HTTP/1.0 web server with a number of unusual features.
Using these features it is possible to quickly develop web applications under UNIX using the incremental compile feature as you would a scripting language. These applications can then be deployed to a conventional web server or served as a "client-client" applet web application served by its own http server running inside the web browser (as in dbexplorer.com) or even the Eclipse IDE (dbeclipse.org).
Download jhttpd/jhttpd.sh # runs the server jhttpd/jhttpd.bat # runs the server (your mileage may vary) jhttpd/lib # jar files to include in classpath jhttpd/docs # root for documents served by server jhttpd/src # place for java servlet sourceUse jhttpd.sh to start the server and browse to the web address given (port 8089). The default page (index.html) has pointers to example servlet (JGI), CGI and Perl server pages(PSP) as starting points. Servlets are contained in the "src" directory and have the class name as the first component of the URL's path.
|
The web server requires a full Java jdk (a.k.a SE) to be installed from
java.sun.com and the
environment variable JAVA_HOME to be set to the place where this is
installed.
Once this is set up you can develop the server itself incrementally by
unziping the contents of lib/jhttpd.jar to place it's source in the "src"
directory and then removing the file lib/jhttpd.jar. The web server
will then recompile itself each time a request is served apart from a
small set of bootstrap and ClassLoader code in org/jhttpd/WebServer.java. |
Advanced Features - Client-Client ArchitectureThe server can also be used from inside a web page itself using a "Java Applet". The advantage of this is that the ease of development of web applications can combined with the ease of deployment of an application that requires no server at all.
To write an embedded web application such as this, the jhttpd.jar needs to be
signed and a pair of frames used, one to host the applet while pages
are served in the other. An example is this is included in the release.
To use an applet use the following HTML:
|
Enjoy using jhttpd - we do. If you have any comments or suggestions for enhancements you can send them directly to us at