Thanks Pradeep.

But Can you tell me how that downcasting works i.e calling a method from HttpResponse Object and assigning it to PrintWriter object
PrintWriter out =rsp.getWriter();