By the out.flush method, http header have been written to the response output
stream,
and also your html output. In spite of these operations your code try to perform
another
operation like page forwarding. I suppose that you want to use servlet chains
and one
output excepted, created by 2 servlet operation. You have to include your second
servlet response into first servlet. Dont forward your request. If you have to
select
forward or not to forward than please donot generate any response output before
your decision point in your code. This means, technically, dont send http page
headers
to your client if you want to forward client request another servlet.
i hope these are helpfull 4 u...