Just for fun (well, almost), I wrote my very own simple HTTP server in Java (
download 100 KB ZIP) the other night. It uses Java5 features, and requires no external libraries. While it certainly does work and can serve a static website HTML+image site, it is of course NOT meant as a "real" web server, so do NOT use it - it's instructional, and it sure was fun to code!
PS: Almost eight years ago, I put online a
Proxy Server written in C on my website, and to my big surprise, during all the years since, every now and then a CS student (presumably asked to write one for class, just like I had at the time), emails some questions... So just in case folks, if you found this page because you are looking for a cheap way out for your homework, by all means download and look at it - but then fix/improve it, and quoting the source and explaining your enhancements! And put a quick comment to this post below.