This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Architect Certification (SCEA/OCMJEA) and the fly likes Doubt  in HTTP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » Architect Certification (SCEA/OCMJEA)
Bookmark "Doubt  in HTTP" Watch "Doubt  in HTTP" New topic
Author

Doubt in HTTP

somkiat puisungnoen
Ranch Hand

Joined: Jul 04, 2003
Posts: 1312
I'm read in some document,

It's said ::

HTTP is connection less.

and in some document said ::


HTTP is connection base.



Please explain to me what choice is correct ... ???


SCJA,SCJP,SCWCD,SCBCD,SCEA I
Java Developer, Thailand
Ramon Gill
Ranch Hand

Joined: May 15, 2003
Posts: 344
Hi Somkiat,
HTTP is a protocol that can be used to send HTML pages between browser and server. It is 'stateless' in that it doesn't remember anything about the previous request.

Ray
D. Rose
Ranch Hand

Joined: Apr 25, 2003
Posts: 215
HTTP is reuest/response based statelss protocol i.e No state is maintained across requests.

If we look definition of 'connection' in HTTP 1.1 RFC

connection
A transport layer virtual circuit established between two programs
for the purpose of communication.

So connection based/connection less term is generally applied to transport levels protocols ( e.g TCP/IP is connection based while UDP is connectionless).
HTTP is not a trasnport layer protocol so I think connection based/connection less does not make any sense. Applicable terms are statfeul/stateless.
somkiat puisungnoen
Ranch Hand

Joined: Jul 04, 2003
Posts: 1312
thank you very much.
Dan Drillich
Ranch Hand

Joined: Jul 09, 2001
Posts: 1167
Pete Morgan spoke about it in his notes at http://www.sarahandpete.com/work/SCEAexamnotes.pdf

HTTP 1.0 (Hyper Text Transfer Protocol) Port 80. Built on top of TCP/IP. Stateless, connection less and directional. Client opens a connection (using a URL � the direction) and sends request to the server, the server responds using the same connection, then the connection is closed. It is up to the client to optionally maintain the session (through cookies or URL re-writing).

HTTP 1.1 (Hypertext Transfer Protocol) Port 80. Same as HTTP 1.0 except there is an option to keep the connection alive from request to request. This would be known as connection oriented if it weren't for the fact that either side can potentially drop the connection at any time (Apache does after 15 seconds), as such it is still 'connection-less'. However, some people think it is connect oriented because you need a connection to be open to do a request at all. I disagree, but I get the impression this is what Sun thinks, I suppose that is what counts for the exam at least, it is very confusing.


Regards,
Dan


William Butler Yeats: All life is a preparation for something that probably will never happen. Unless you make it happen.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Doubt in HTTP
 
Similar Threads
Adding attachment to outlook express
Problem with XML
XML - Java Communication
HTTP protocol: Connection-less or Connection-based?
Question about HTTP