Java interview questions: – Can you explain why is HTTP protocol called as a stateless protocol?

A protocol is stateless if it can remember difference between one client request and the other. HTTP is a stateless protocol because each request is executed independently without any knowledge of the requests that came before it.

java

Figure: – HTTP Protocol in action

Above is a pictorial presentation of how a stateless protocol operates. User first sends “request1” and server responds with “response1”. When the same user comes back with “request2” server treats this as new user and has no idea that it’s the same user who has come with the request. In short every request is a new request for the HTTP protocol so it’s called as a stateless protocol.

See the following video on java for implementation of many To One relations in database using Hibernate: –

Click for more Java interview questions

Regards,

Visit for more author’s blog on Java interview questions

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s