Ciao Ragazzi, cosa vuol dire:
Codice PHP:
java.lang.IllegalStateException: getOutputStream() has already been called for this response
Ciao Ragazzi, cosa vuol dire:
Codice PHP:
java.lang.IllegalStateException: getOutputStream() has already been called for this response
Stai sicuramente parlando di Servlet/JSP. Ci sono 2 modi per scrivere la response. Con il PrintWriter fornito da getWriter() oppure con il ServletOutputStream fornito da getOutputStream(). Solo uno dei due metodi può essere invocato. Mai entrambi nel contesto di una response.Originariamente inviato da HarryPitter
cosa vuol dire:
Codice PHP:
java.lang.IllegalStateException: getOutputStream() has already been called for this response
Andrea, andbin.dev – Senior Java developer – SCJP 5 (91%) • SCWCD 5 (94%)
java.util.function Interfaces Cheat Sheet — Java Versions Cheat Sheet
ah, quindi l'errore è dovuto all'utilizzo di tutti e due? Non si tratta di un close già effettuato o di un flush?...
comqune io uso:
out= (OutputStream)response.getOutputStream();
ho visto nel mio codice, ho usato soltanto getOutputStream.