This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
I would like to know what is the use of two parameters in forward(request,response).
It is understood that request is required as i am forwarding the data from one place to another place and that is also to do process something on the that side(jsp/servlet).
But once i forward the data it never comes back so i think no need for response object.(Correct this if i am wrong).
So please explain the reason of using response in forward method.
Yes you are incorrect. There is a need of response object.
It is possible that you may have a requirement wherein you send the response to the client using PrintWriter despite of forwarding request from one servlet to other resource.