java.lang.IllegalStateException: PWC3990: getWriter() has already been called for this response
How to solve this error? I run a simple servlet code to display the bar graph.
java.lang.IllegalStateException: PWC3990: getWriter() has already been called for this response
How to solve this error? I run a simple servlet code to display the bar graph.
You cannot call both getOutputStream()
and getWriter()
on the same response. Keep in mind that JSP implicitly uses getWriter()
.
getOutputStream()
instead. You can use OutputStreamWriter
for this. Since I don't use JFreeChart, I only don't know if it's allowed by JFreeChart to mix the response like that. –
Anastasius Also make sure that the request is not being redirected to current servlet from some place else. If it is, then there is a high probability that one of getOutputStream()
or getWriter()
has already been called on it.
© 2022 - 2024 — McMap. All rights reserved.