It's not a secret anymore!*
The moose likes Servlets and the fly likes HTTP and TCP/IP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "HTTP and TCP/IP" Watch "HTTP and TCP/IP" New topic
Author

HTTP and TCP/IP

L Goundalkar
Ranch Hand

Joined: Jul 05, 2001
Posts: 395
Hi all,
HTTP works on TCP/IP connection. Does this mean that its a from of "Tunnelling"?
Thanks.

------------------
L Goundalkar
lggoundalkar@hotmail.com
Sun Certified Programmer for Java 2 Platform


SCJP, SCWCD
nan sh
Ranch Hand

Joined: Jan 05, 2001
Posts: 167
No, Tunnelling is under Application level(HTTP) and above the TCP/IP,
Tunnelling needs TCP/IP's.


Have you tried this Mock Exam Testing Engine yet?<br /><a href="http://www.mycgiserver.com/~nan111/index.html" target="_blank" rel="nofollow">www.mycgiserver.com/~nan111/index.html</a>
L Goundalkar
Ranch Hand

Joined: Jul 05, 2001
Posts: 395
Hi,
As per the Servlet Tunneling definition, i.e.
" Tunneling is a way to use a existing road of communication and create a subprotocol within it to perform specific tasks. The subprotocol will contain all the necessary information to create an object on the web server, invoke methods on that object and return results back to the client."
So doesn't we use the communication link of TCP/IP through HTTP. This means that HTTP is the subprotocol which is used. So isn't it a example of tunneling?
Thanks.

------------------
L Goundalkar
lggoundalkar@hotmail.com
Sun Certified Programmer for Java 2 Platform
nan sh
Ranch Hand

Joined: Jan 05, 2001
Posts: 167
Http is a standard protocal, when we say tunnelling, normally means your private protocal, well I think this question is too academic that I can answer.
L Goundalkar
Ranch Hand

Joined: Jul 05, 2001
Posts: 395
Thanks Nan.

------------------
L Goundalkar
lggoundalkar@hotmail.com
Sun Certified Programmer for Java 2 Platform
Peter den Haan
author
Ranch Hand

Joined: Apr 20, 2000
Posts: 3252
HTTP does not tunnel through TCP/IP, but is sitting on top of it. Why? Because it is making heavy use of TCP/IP facilities. When you request a URL, you are using a "connection" to a "socket" on a host represented by an "IP address" - all these quoted words are infrastructure coming from the TCP and IP layers. You could conceivably use some other infrastructure if you wanted, but it would need to offer facilities similar to TCP/IP for HTTP to work.
Tunneling works differently. In tunneling, you route a protocol over another, completely unrelated protocol. You don't need or even want that other protocol, but have to use it because nothing else gets through. Tunneling is usually (but not necessarily) done through HTTP because that's how you can get through firewalls most easily.
Take, for example, tunneling the RMI protocol through HTTP. RMI, in itself, does not make use of HTTP at all. The infrastructure of HTTP (GET and POST requests, headers, response codes, etc) is completely foreign to it, and you wouldn't dream of using HTTP for RMI if you can avoid it. Yet HTTP tunneling packages the RMI call inside a valid HTTP request; the receiving servlet (or cgi binary or...) unwraps the RMI call and performs it; the result is again wrapped in a valid HTTP response. That way, RMI remote procedure calls are smuggled through any firewall that allows HTTP traffic.
- Peter
[This message has been edited by Peter den Haan (edited November 07, 2001).]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: HTTP and TCP/IP