You can get the code (cleaned up and polished) from Lecture 3 on github:
https://github.com/weitsang/nus-cs2105-socket-programming
You can download the whole thing as a zip file (click on “Download Zip” on the lower right corner).
If you are familiar with git, feel free to clone and submit pull request if you found any bug.
Prof, where can I get demo.html that is used in webserver.java? Thanks.
You can create any html file yourself and use that as demo.html.
Or you can download a sample from
http://www.comp.nus.edu.sg/~ooiwt/demo.html
(not the same one I shown in Lecture 3 though — that is a special CNY demo :))