The above is the piece of code that I wrote on doGet of my serlvelt. Here I used out.write and out.flush before forward. But it does not throw any exception. The weird thing is If I comment out.flush, request dispatcher is working. otherwise whatever I print on doGet gets diplayed on browser.