https://bz.apache.org/bugzilla/show_bug.cgi?id=64081
Bug ID: 64081
Summary: Fix for 49464 looks to introduced a regression on
jstl's import tag support under certain condition
Product: Tomcat 9
Version: 9.0.26
Hardware: PC
Status: NEW
Severity: regression
Priority: P2
Component: Catalina
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: -----
Created attachment 36968
--> https://bz.apache.org/bugzilla/attachment.cgi?id=36968&action=edit
A demonstration webapp zip of the issue behavior.
A simple jsp below could demonstrate the issue behavior - when it is used with
javax.servlet.jsp.jstl-1.2.3.jar and javax.servlet.jsp.jstl-api-1.2.1.jar
instead of taglibs-standard-impl-1.2.5.jar and taglibs-standard-spec-1.2.5.jar.
I have also created a simple webapp with such. Some environment factors might
play - Windows 10 pro with en-US/Eastern Time zone was used when the issue was
encountered. java version is 11.0.5 was used but looks not relavent.
<!--begin of jsp>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<fmt:setLocale value='' scope="session"/>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>ShowBug</title>
</head>
<body>
<div id="xsltnot"> c:import is not expected to get the contents in between
-<br>
---------------------------------------------<br>
<c:import var="xslt" url="/sample.txt"/><br>
---------------------------------------------<br>
</div>
<br>
<br>
<div id="xslt"> Instead, we expect the c:import to get the contents into
the variable, which should be displayed in between *<br>
********************************************<br>
<c:out value="${xslt}" escapeXml="true"/><br>
********************************************<br>
</div>
</body>
</html>
<!-- end of jsp>
Attached is also webapp bug.zip. Deployed it to a Tomcat 9.0.26 clean web
server, accessing the <http://localhost:8080>/bug/ShowBug.jsp, would get the
contents from import tag to show up in the result html, while the variable left
empty - which is not expected, while /bug/ShowNoBug.jsp would show the expected
behavior, with the result html not receiving the content from the import
target, but the variable gets populated.
The behavior is also observed with Tomcat 8.5.45, where the fix for 49464 had
been back patched. Tomcat 8.5.32 that does not contain the fix, does not show
to have the issue.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]