You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2020/02/10 16:38:54 UTC
[tomcat] branch 9.0.x updated: Fix missing implicit TLD map entries.
This is an automated email from the ASF dual-hosted git repository.
markt pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/9.0.x by this push:
new 3a24514 Fix missing implicit TLD map entries.
3a24514 is described below
commit 3a24514a375776c2b73a8021d841a58c5ef05cb7
Author: Markus Lottmann <ma...@shiftleft.io>
AuthorDate: Wed Dec 11 15:10:04 2019 +0100
Fix missing implicit TLD map entries.
If TldResourcePath was already registred during parsing of jsp-config
section of web.xml, the implicit TLD map entries (derived from TLD files
URI) were not added to the uriTldResourcePathMap.
This was not in line with JSP2.2 specification section 7.3.4.
---
java/org/apache/jasper/servlet/TldScanner.java | 10 ++++++----
webapps/docs/changelog.xml | 7 +++++++
2 files changed, 13 insertions(+), 4 deletions(-)
diff --git a/java/org/apache/jasper/servlet/TldScanner.java b/java/org/apache/jasper/servlet/TldScanner.java
index 5956ca2..4561739 100644
--- a/java/org/apache/jasper/servlet/TldScanner.java
+++ b/java/org/apache/jasper/servlet/TldScanner.java
@@ -272,10 +272,6 @@ public class TldScanner {
}
protected void parseTld(TldResourcePath path) throws IOException, SAXException {
- if (tldResourcePathTaglibXmlMap.containsKey(path)) {
- // TLD has already been parsed as a result of processing web.xml
- return;
- }
TaglibXml tld = tldParser.parse(path);
String uri = tld.getUri();
if (uri != null) {
@@ -283,6 +279,12 @@ public class TldScanner {
uriTldResourcePathMap.put(uri, path);
}
}
+
+ if (tldResourcePathTaglibXmlMap.containsKey(path)) {
+ // TLD has already been parsed as a result of processing web.xml
+ return;
+ }
+
tldResourcePathTaglibXmlMap.put(path, tld);
if (tld.getListeners() != null) {
listeners.addAll(tld.getListeners());
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 82c6ea9..9793ab4 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -64,6 +64,13 @@
Parameterize JSP version and API class names in localization messages to
allow simpler re-use between major versions. (markt)
</scode>
+ <fix>
+ Ensure that TLD files listed in the <code>jsp-config</code> section of
+ <code>web.xml</code> that are registered in the
+ <code>uriTldResourcePathMap</code> with the URI specified in
+ <code>web.xml</code> are also registered with the URI in the TLD file if
+ it is different. Patch provided by Markus Lottmann. (markt)
+ </fix>
</changelog>
</subsection>
<subsection name="Cluster">
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org