but i saw in a mock exam that says servlet will stop execution ,if the response.setContentLength(0);
You probably didn't notice that the answer to the question is False.
Mock exam questions may include bizarre statements like that which you are supposed to be able to spot. If you were familiar with the servlet API for the HttpServletResponse object you would know that the method only sets a value in a response header.
Bill (who has written lots of bizarre questions for mock exams)