Bug 65491 - Behavior differences with c:import when flushing out data
Summary: Behavior differences with c:import when flushing out data
Status: NEW
Alias: None
Product: Taglibs
Classification: Unclassified
Component: Standard Taglib (show other bugs)
Version: 1.2.5
Hardware: PC Mac OS X 10.1
: P2 normal (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
Depends on:
Reported: 2021-08-09 15:54 UTC by Volodymyr Siedlecki
Modified: 2021-08-09 15:54 UTC (History)
0 users


Note You need to log in before you can comment on or make changes to this bug.
Description Volodymyr Siedlecki 2021-08-09 15:54:11 UTC

I would like some clarification on what behavior is correct here, given the JSPs below.  There's a difference between the Tomcat/Apache Taglibs & the Eclipse Foundation's Tag Library implementations. 


<%@ page session="false" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<TABLE border>
        <TD>Hello world</TD>
        <td>The import</td>
        <td><c:import url="imported-file.jsp" var="foo"/></td>
        <td>The output</td>
        <td><c:out value="${foo}"/></td>


<%@ page session="false" %>
Start of test a
<% out.flush(); %>
End of test a

Should anything be displayed when importing a file, even when an out.flush() is called? File contents should only be stored in the variable, until is outputted? 

I also created a sister issue here (with screenshots) -- https://github.com/eclipse-ee4j/jstl-api/issues/153 

The spec appears ambiguous on this scenario, so I hope someone here can provide some insight?  What is the correct behavior here? 

In the Eclipse's Impl, calling out.flush within the import flushes that straight to the page.  

Eclipse (I testing using EE9's 2.0, but it's also the similar for the 1.2.7 version):


Apache (version 1.2.5):

Thank you!