MCPcopy Create free account
hub / github.com/apache/tomcat / initOut

Method initOut

java/org/apache/jasper/runtime/JspWriterImpl.java:111–124  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

109 }
110
111 private void initOut() throws IOException {
112 if (out == null) {
113 try {
114 out = response.getWriter();
115 } catch (IllegalStateException e) {
116 /*
117 * At some point in the processing something (most likely the default servlet as the target of a
118 * <jsp:forward ... /> action) wrote directly to the OutputStream rather than the Writer. Wrap the
119 * OutputStream in a Writer so the JSP engine can use the Writer it is expecting to use.
120 */
121 out = new PrintWriter(response.getOutputStream());
122 }
123 }
124 }
125
126 @Override
127 public final void clear() throws IOException {

Callers 2

flushBufferMethod · 0.95
writeMethod · 0.95

Calls 2

getWriterMethod · 0.65
getOutputStreamMethod · 0.65

Tested by

no test coverage detected