my dog learned polymorphism*
The moose likes Servlets and the fly likes Webserver speaks HTML and follows HTTP protocol (rules) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Webserver speaks HTML and follows HTTP protocol (rules)" Watch "Webserver speaks HTML and follows HTTP protocol (rules)" New topic
Author

Webserver speaks HTML and follows HTTP protocol (rules)

ankur rathi
Ranch Hand

Joined: Oct 11, 2004
Posts: 3830
I just started HF S&J. The line 'If you are a web server, you speak HTTP' is confusing me. It should be HTML because HTTP is a protocol not a language...



Thanks.
[ August 11, 2005: Message edited by: rathi ji ]
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41599
    
  55
The statement ia correct, because what the web server reads and writes is HTTP. It doesn't know the first thing about HTML. A response may carry HTML, or it may not, e.g. with Web Services. Requests are pure HTTP, with no HTML at all. In a nutshell, a web application writes HTML, but the web server carries it over HTTP. (And the network carries that over TCP/IP, and has no clue what HTTP is.)


Ping & DNS - my free Android networking tools app
ankur rathi
Ranch Hand

Joined: Oct 11, 2004
Posts: 3830
Thanks Ulf for superb response.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Webserver speaks HTML and follows HTTP protocol (rules)