tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r814377 - in /tomcat/trunk/java/org/apache/catalina/startup: LocalStrings.properties WebXmlCommon.java
Date Sun, 13 Sep 2009 18:27:38 GMT
Author: markt
Date: Sun Sep 13 18:27:37 2009
New Revision: 814377

URL: http://svn.apache.org/viewvc?rev=814377&view=rev
Log:
Unlikely, but handle it in case.

Modified:
    tomcat/trunk/java/org/apache/catalina/startup/LocalStrings.properties
    tomcat/trunk/java/org/apache/catalina/startup/WebXmlCommon.java

Modified: tomcat/trunk/java/org/apache/catalina/startup/LocalStrings.properties
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/startup/LocalStrings.properties?rev=814377&r1=814376&r2=814377&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/startup/LocalStrings.properties (original)
+++ tomcat/trunk/java/org/apache/catalina/startup/LocalStrings.properties Sun Sep 13 18:27:37
2009
@@ -116,4 +116,5 @@
 webXmlCommon.duplicateMessageDestinationRef=Duplicate message-destination-ref name
 webXmlCommon.duplicateResourceEnvRef=Duplicate resource-env-ref name
 webXmlCommon.duplicateResourceRef=Duplicate resource-ref name
+webXmlCommon.reservedName=A web.xml file was detected using a reserved name [{0}]. The name
element will be ignored for this fragment.
 webXmlFragment.multipleOther=Multiple others entries in ordering

Modified: tomcat/trunk/java/org/apache/catalina/startup/WebXmlCommon.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/startup/WebXmlCommon.java?rev=814377&r1=814376&r2=814377&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/startup/WebXmlCommon.java (original)
+++ tomcat/trunk/java/org/apache/catalina/startup/WebXmlCommon.java Sun Sep 13 18:27:37 2009
@@ -57,6 +57,9 @@
     protected static final StringManager sm =
         StringManager.getManager(Constants.Package);
 
+    private static org.apache.juli.logging.Log log=
+        org.apache.juli.logging.LogFactory.getLog(WebXmlCommon.class);
+    
     // Required attribute of web-app element
     private String version = null;
     public String getVersion() { return version; }
@@ -71,7 +74,14 @@
     // Optional name element
     private String name = null;
     public String getName() { return name; }
-    public void setName(String name) { this.name = name; }
+    public void setName(String name) {
+        if (ORDER_OTHERS.equalsIgnoreCase(name)) {
+            // This is unusual. This name will be ignored. Log the fact.
+            log.warn(sm.getString("webXmlCommon.reservedName", name));
+        } else {
+            this.name = name;
+        }
+    }
 
     // web-app elements
     // TODO: Ignored elements:



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


Mime
View raw message