ttomcat-1778514358873.zip-extract/apache-tomcat-11.0.18-src/java/org/apache/jasper/runtime/ServletResponseWrapperInclude.java

Path
ttomcat-1778514358873.zip-extract/apache-tomcat-11.0.18-src/java/org/apache/jasper/runtime/ServletResponseWrapperInclude.java
Status
scanned
Type
file
Name
ServletResponseWrapperInclude.java
Extension
.java
Programming language
Java
Mime type
text/plain
File type
ASCII text, with CRLF line terminators
Tag

      
    
Rootfs path

      
    
Size
2511 (2.5 KB)
MD5
1d82f024f25d2a862013dc124130a908
SHA1
65edd3776a3ffa57fa67b97f08cce3d4b6d4652a
SHA256
f185aa92469995996dd9a4634d5cf89d8095b2e6945399f0f89dd942e444d4ba
SHA512

      
    
SHA1_git
c38d34d01ef5899c27fa37593ee0ecd026f3ef71
Is binary

      
    
Is text
True
Is archive

      
    
Is media

      
    
Is legal

      
    
Is manifest

      
    
Is readme

      
    
Is top level

      
    
Is key file

      
    
ServletResponseWrapperInclude.java | 2.5 KB |

/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.jasper.runtime; import java.io.IOException; import java.io.PrintWriter; import jakarta.servlet.ServletOutputStream; import jakarta.servlet.ServletResponse; import jakarta.servlet.http.HttpServletResponse; import jakarta.servlet.http.HttpServletResponseWrapper; import jakarta.servlet.jsp.JspWriter; /** * ServletResponseWrapper used by the JSP 'include' action. This wrapper response object is passed to * RequestDispatcher.include(), so that the output of the included resource is appended to that of the including page. */ public class ServletResponseWrapperInclude extends HttpServletResponseWrapper { /** * PrintWriter which appends to the JspWriter of the including page. */ private final PrintWriter printWriter; private final JspWriter jspWriter; public ServletResponseWrapperInclude(ServletResponse response, JspWriter jspWriter) { super((HttpServletResponse) response); this.printWriter = new PrintWriter(jspWriter); this.jspWriter = jspWriter; } /** * @return a wrapper around the JspWriter of the including page. */ @Override public PrintWriter getWriter() throws IOException { return printWriter; } @Override public ServletOutputStream getOutputStream() throws IOException { throw new IllegalStateException(); } /** * Clears the output buffer of the JspWriter associated with the including page. */ @Override public void resetBuffer() { try { jspWriter.clearBuffer(); } catch (IOException ioe) { // Ignore } } }
Detected license expression
apache-2.0
Detected license expression (SPDX)
Apache-2.0
Percentage of license text
43.27
Copyrights

      
    
Holders

      
    
Authors

      
    
License detections License expression License expression SPDX
apache_2_0-4bde3f57-78aa-4201-96bf-531cba09e7de apache-2.0 Apache-2.0
URL Start line End line
http://www.apache.org/licenses/LICENSE-2.0 9 9