i have a legacy code that writes a jsp page in xml, and i am trying to convert it to JSF 2 but i am getting the following exception:
Jul 10, 2012 11:34:57 AM
This will happen if during the request processing both HttpServletResponse.getWriter()
and HttpServletResponse.getOutputStream()
are being called. And as per the spec, it is illegal to use both OutputStream
and Writer
.
Check the code which is calling HttpServletResponse.getOutputStream()
somewhere else in your code.
Possible Duplicate of getting error “getOutputStream() has already been called for this response”.
my problem was that i was forgetting to close the outputstream in some other place in the code that was not posted above.