wood burning stoves 2.0*
The moose likes Servlets and the fly likes What is keep-alive header about? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "What is keep-alive header about?" Watch "What is keep-alive header about?" New topic
Author

What is keep-alive header about?

Mohan Panigrahi
Ranch Hand

Joined: Sep 28, 2001
Posts: 142
HTTP is stateless protocol...so what does keep-alive K header mean..in the response to the client?

Thanks,
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Think of it as a slight 'bending' of the rules.
http://www.w3.org/Protocols/rfc2616/rfc2616-sec8.html

From an application developer's viewpoint, it IS stateless.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
D Rog
Ranch Hand

Joined: Feb 07, 2004
Posts: 472

Some application developers use keep-alive to improve performance and reduce resource consumption of embedded system. When server returns keep-alive it means for a client to continue using the same connection. However it doesn't mean that the same servlet will continue to service it.


Retire your iPod and start with HD Android music player Kamerton | Minimal J2EE container is here | Light weight full J2EE stack | and build tool | Co-author of "Windows programming in Turbo Pascal"
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: What is keep-alive header about?