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 2026/10/19 19:33:29 UTC
(tomcat) branch 9.0.x updated: Follow-on to "Skip parsing a context configuration file ..."
This is an automated email from the ASF dual-hosted git repository.
markt-asf 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 433915d6d0 Follow-on to "Skip parsing a context configuration file ..."
433915d6d0 is described below
commit 433915d6d07e7cbcf2a917d8c35f351881b8dc31
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Mon Oct 19 20:26:52 2026 +0100
Follow-on to "Skip parsing a context configuration file ..."
Fix the same problem parsing web.xml files
---
java/org/apache/catalina/startup/ContextConfig.java | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/java/org/apache/catalina/startup/ContextConfig.java b/java/org/apache/catalina/startup/ContextConfig.java
index d6417a5138..10d3a10192 100644
--- a/java/org/apache/catalina/startup/ContextConfig.java
+++ b/java/org/apache/catalina/startup/ContextConfig.java
@@ -2080,8 +2080,12 @@ public class ContextConfig implements LifecycleListener {
try {
stream = webXmlResource.getInputStream();
- source = new InputSource(webXmlResource.getURI().toString());
if (stream != null) {
+ // Only create the input source if the stream is available so
+ // that a source without a byte stream is never returned. The
+ // parser would otherwise try to resolve the URI itself and
+ // report the same problem a second time.
+ source = new InputSource(webXmlResource.getURI().toString());
source.setByteStream(stream);
}
} catch (Exception e) {
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org