Is it possible to close http connection on the server side. I have java application with the sun java http server embedded. However after some research, I cannot see api to close socket connection on server side.
There is something similar in Apache Tomcat configuration, where you can close a connection on server side after X amount of requests.
But I have been unable to see something similar on the Sun java HttpServer.
Any ideas if this functionality is available? Or is it assumed to be left to client(s) to close connection(s).
Thanks
EDIT: adding the Tomcat info for reference: The tomcat config is in relation to the maxKeepAliveRequests.
The maximum number of HTTP requests which can be pipelined until the connection is closed by the server. Setting this attribute to 1 will disable HTTP/1.0 keep-alive, as well as HTTP/1.1 keep-alive and pipelining. Setting this to -1 will allow an unlimited amount of pipelined or keep-alive HTTP requests. If not specified, this attribute is set to 100.
Sample from a tomcat server.xml for Connector config:
<Connector executor="tomcatThreadPool" port="8080" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" acceptCount="2000" maxKeepAliveRequests="500000" allowTrace="true"/>