To compile this you will need any version of JDK >1.1.2. Just compile them with command-
javac *.javaAnd then run the server with command-
java TestServer [port]The port is optional and if not specified defaults to 4321. Assuming that the server is running on http://foo:4321/ Use the following URLs to retrieve special responses. In order to create your own special case- telnet to foo, and edit the docs/urlmap file to handle special cases and then add info here about it.
http://foo:4321/help | This help file. |
http://foo:4321/ | Default echo of the server. Prints the request out. |
http://foo:4321/multi | Returns a multipart message. |
http://foo:4321/close | Returns "Connection: close" in a response header. |
http://foo:4321/both | Returns the request as well as the response headers. |
If you need any more help with running this server, or have suggestions to improve it let me know.