File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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 Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "What is keep-alive header about?" Watch "What is keep-alive header about?" New topic

What is keep-alive header about?

Mohan Panigrahi
Ranch Hand

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

Ben Souther

Joined: Dec 11, 2004
Posts: 13410

Think of it as a slight 'bending' of the rules.

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"
I agree. Here's the link:
subject: What is keep-alive header about?
It's not a secret anymore!