How to explicitly terminate http connection from server with no response header
- by Gagandip
I am developing a server simulator for one of my client application. I am using GlassFish server. I have to simulate a http connection terminate condition in my server application.
Is there a way by which I can explicitly terminate a connection from server side such that client does not receive any response header. Currently I have tried many options like closing the response outputStream. But in every case a http 200 OK message is delivered to the client application. I would like to consume the http-request and do not want to return anything to the client.
I am using a simple conrtroller servlet and had overridden doGet() and doPost() functions.