JWS: The Java Webserver
(C) 2007 Ben Cantrick
This is an extremely minimal webserver implemented in Java. Possibly useful for learning purposes. ~120 lines. A test.html file is included for your testing convenience.
This code is distributed under the modified BSD license. Share and enjoy freely, but give credit where credit is due.
I wrote this up earlier today, just for grins, before a job interview. But then I figured it might be interesting and/or amusing for a few of my friends.
Patches are definitely welcome - see "Bugs." I'm trying to keep it as simple and minimal as possible, and it feels like I should be able to do this in fewer lines. Java makes the socket stuff a lot simpler, so you'd think this could be done more concisely. I blame try/catch hell.
See also: The GWS.