How to explicitly terminate http connection from server with no response header

Posted by Gagandip on Stack Overflow See other posts from Stack Overflow or by Gagandip
Published on 2010-06-11T19:15:26Z Indexed on 2010/06/11 20:43 UTC
Read the original article Hit count: 192

Filed under:
|

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.

© Stack Overflow or respective owner

Related posts about java

Related posts about servlets