From 7f215f94b5b76767ad738d4694088bfd7e13dae8 Mon Sep 17 00:00:00 2001 From: markt Date: Wed, 6 Jan 2010 19:04:32 +0000 Subject: [PATCH] Prevent NPE in emebedded case when no web.xml is provided at all git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@896622 13f79535-47bb-0310-9956-ffa450edef68 --- java/org/apache/jasper/compiler/JspConfig.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/java/org/apache/jasper/compiler/JspConfig.java b/java/org/apache/jasper/compiler/JspConfig.java index 0fa529d0e..944cda60e 100644 --- a/java/org/apache/jasper/compiler/JspConfig.java +++ b/java/org/apache/jasper/compiler/JspConfig.java @@ -77,9 +77,12 @@ public class JspConfig { try { webXml = new WebXml(ctxt); - ParserUtils pu = new ParserUtils(); - TreeNode webApp = pu.parseXMLDocument(webXml.getSystemId(), - webXml.getInputSource()); + TreeNode webApp = null; + if (webXml.getInputSource() != null) { + ParserUtils pu = new ParserUtils(); + webApp = pu.parseXMLDocument(webXml.getSystemId(), + webXml.getInputSource()); + } if (webApp == null || getVersion(webApp) < 2.4) { -- 2.11.0