Page 1 2 3 4 >>  
 

Java - Web Server

This is a simple web server with minimum functionality. I started writing this just to see how hard it is to write a web server. The concept is pretty simple but the effort to implement every single specification is tedious.

Problem: Heck, can I write a web server?

Goal: Write a HTTP1.0/1.1 compliant http server

Initially, I had to research how a browser and a http server communicate. I looked up HTTP specification on www.w3.org but there's just too much information it made me more confused.. Then I realized that you can connect to a web server using telnet so I typed in some request on a command prompt.

[pompei]:~$ telnet www.pompei.com 80
Trying 122.33.6.2...
Connected to pompei.com.
Escape character is '^]'.
GET / HTTP/1.0

HTTP/1.1 200 OK
Date: Sat, 15 Sep 2001 17:45:36 GMT
Server: Apache/1.3.19 (Unix)
Last-Modified: Sat, 15 Sep 2001 04:40:28 GMT
ETag: "1ab85b-1465-3ba2dbbc"
Accept-Ranges: bytes
Content-Length: 5221
Connection: close
Content-Type: text/html


[HTML Contents Continue here...]
Continue

   
     
   
[contact][about me][disclaimer]