You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2021/08/09 15:54:11 UTC
[Bug 65491] New: Behavior differences with c:import when flushing
out data
https://bz.apache.org/bugzilla/show_bug.cgi?id=65491
Bug ID: 65491
Summary: Behavior differences with c:import when flushing out
data
Product: Taglibs
Version: 1.2.5
Hardware: PC
OS: Mac OS X 10.1
Status: NEW
Severity: normal
Priority: P2
Component: Standard Taglib
Assignee: dev@tomcat.apache.org
Reporter: volosied@apache.org
Target Milestone: ---
Hello,
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.
test.jsp:
<%@ page session="false" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<TABLE border>
<TR>
<TD>Hello world</TD>
<TD><%=System.currentTimeMillis()%></TD>
</TR>
<tr>
<td>The import</td>
<td><c:import url="imported-file.jsp" var="foo"/></td>
</tr>
<tr>
<td>The output</td>
<td><c:out value="${foo}"/></td>
</tr>
</TABLE>
imported-file.jsp:
<%@ 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):
https://github.com/eclipse-ee4j/jstl-api/blob/1.2.7/impl/src/main/java/org/apache/taglibs/standard/tag/common/core/ImportSupport.java
https://github.com/eclipse-ee4j/jstl-api/blob/1.2.7/impl/src/main/java/org/apache/taglibs/standard/tag/common/core/ImportSupport.java#L514-L521
Apache (version 1.2.5):
https://github.com/apache/tomcat-taglibs-standard/blob/taglibs-standard-1.2.5/impl/src/main/java/org/apache/taglibs/standard/tag/common/core/ImportSupport.java#L470
Thank you!
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org