The problem is that this is a JSP.A
JSP when converted to
Servlet,its service method will define the implicit objects on its own.As you know out is an implicit object and it is got by calling getWriter() method on the response,since on the same response object you cannot call getWriter and getOutputStream,its giving you this error.In servlet you wont get the same error but outputStream is for writing binarydata for character data you have to use getWriter method