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 2017/07/04 19:18:57 UTC

svn commit: r1800808 - in /tomcat/trunk/java/org/apache/catalina/startup: Constants.java ContextConfig.java

Author: markt
Date: Tue Jul  4 19:18:57 2017
New Revision: 1800808

URL: http://svn.apache.org/viewvc?rev=1800808&view=rev
Log:
Refactor to use a constant like the other files.

Modified:
    tomcat/trunk/java/org/apache/catalina/startup/Constants.java
    tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java

Modified: tomcat/trunk/java/org/apache/catalina/startup/Constants.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/startup/Constants.java?rev=1800808&r1=1800807&r2=1800808&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/startup/Constants.java (original)
+++ tomcat/trunk/java/org/apache/catalina/startup/Constants.java Tue Jul  4 19:18:57 2017
@@ -27,6 +27,7 @@ public final class Constants {
 
     public static final String ApplicationContextXml = "META-INF/context.xml";
     public static final String ApplicationWebXml = "/WEB-INF/web.xml";
+    public static final String TomcatWebXml = "/WEB-INF/tomcat-web.xml";
     public static final String DefaultContextXml = "conf/context.xml";
     public static final String DefaultWebXml = "conf/web.xml";
     public static final String HostContextXml = "context.xml.default";

Modified: tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java?rev=1800808&r1=1800807&r2=1800808&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java (original)
+++ tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java Tue Jul  4 19:18:57 2017
@@ -1473,7 +1473,7 @@ public class ContextConfig implements Li
         // not defined any welcomes files.
         webXmlTomcatFragment.setAlwaysAddWelcomeFiles(false);
 
-        WebResource resource = context.getResources().getResource("/WEB-INF/tomcat-web.xml");
+        WebResource resource = context.getResources().getResource(Constants.TomcatWebXml);
         if (resource.isFile()) {
             try {
                 InputSource source = new InputSource(resource.getURL().toURI().toString());



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org