Author: markt Date: Fri Jan 15 18:04:22 2010 New Revision: 899737 URL: http://svn.apache.org/viewvc?rev=899737&view=rev Log: Re-factoring. WebXml is a better fit in o.a.c.deploy
Added: tomcat/trunk/java/org/apache/catalina/deploy/Constants.java (with props) tomcat/trunk/java/org/apache/catalina/deploy/LocalStrings.properties (with props) tomcat/trunk/java/org/apache/catalina/deploy/WebXml.java - copied, changed from r899666, tomcat/trunk/java/org/apache/catalina/startup/WebXml.java tomcat/trunk/test/org/apache/catalina/deploy/ tomcat/trunk/test/org/apache/catalina/deploy/TestWebXml.java - copied, changed from r899666, tomcat/trunk/test/org/apache/catalina/startup/TestWebXml.java Removed: tomcat/trunk/java/org/apache/catalina/startup/WebXml.java tomcat/trunk/test/org/apache/catalina/startup/TestWebXml.java Modified: tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java tomcat/trunk/java/org/apache/catalina/startup/LocalStrings.properties tomcat/trunk/java/org/apache/catalina/startup/WebRuleSet.java tomcat/trunk/test/org/apache/TestAll.java Added: tomcat/trunk/java/org/apache/catalina/deploy/Constants.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/deploy/Constants.java?rev=899737&view=auto ============================================================================== --- tomcat/trunk/java/org/apache/catalina/deploy/Constants.java (added) +++ tomcat/trunk/java/org/apache/catalina/deploy/Constants.java Fri Jan 15 18:04:22 2010 @@ -0,0 +1,26 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +package org.apache.catalina.deploy; + + +public class Constants { + + public static final String Package = "org.apache.catalina.deploy"; + +} Propchange: tomcat/trunk/java/org/apache/catalina/deploy/Constants.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: tomcat/trunk/java/org/apache/catalina/deploy/Constants.java ------------------------------------------------------------------------------ svn:keywords = Date Author Id Revision Added: tomcat/trunk/java/org/apache/catalina/deploy/LocalStrings.properties URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/deploy/LocalStrings.properties?rev=899737&view=auto ============================================================================== --- tomcat/trunk/java/org/apache/catalina/deploy/LocalStrings.properties (added) +++ tomcat/trunk/java/org/apache/catalina/deploy/LocalStrings.properties Fri Jan 15 18:04:22 2010 @@ -0,0 +1,41 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +webXml.duplicateEnvEntry=Duplicate env-entry name [{0}] +webXml.duplicateFilter=Duplicate filter name [{0}] +webXml.duplicateMessageDestination=Duplicate message-destination name [{0}] +webXml.duplicateMessageDestinationRef=Duplicate message-destination-ref name [{0}] +webXml.duplicateResourceEnvRef=Duplicate resource-env-ref name [{0}] +webXml.duplicateResourceRef=Duplicate resource-ref name [{0}] +webXml.duplicateTaglibUri=Duplicate tag library URI [{0}] +webXml.reservedName=A web.xml file was detected using a reserved name [{0}]. The name element will be ignored for this fragment. +webXml.mergeConflictDisplayName=The display name was defined in multiple fragments with different values including fragment with name [{0}] located at [{1}] +webXml.mergeConflictErrorPage=The Error Page for [{0}] was defined inconsistently in multiple fragments including fragment with name [{1}] located at [{2}] +webXml.mergeConflictFilter=The Filter [{0}] was defined inconsistently in multiple fragments including fragment with name [{1}] located at [{2}] +webXml.mergeConflictLoginConfig=A LoginConfig was defined inconsistently in multiple fragments including fragment with name [{1}] located at [{2}] +webXml.mergeConflictOrder=Fragment relative ordering contains circular references. Thsi can be resolved by using absolute ordering in web.xml. +webXml.mergeConflictResource=The Resource [{0}] was defined inconsistently in multiple fragments including fragment with name [{1}] located at [{2}] +webXml.mergeConflictServlet=The Servlet [{0}] was defined inconsistently in multiple fragments including fragment with name [{1}] located at [{2}] +webXml.mergeConflictSessionCookieName=The session cookie name was defined inconsistently in multiple fragments with different values including fragment with name [{0}] located at [{1}] +webXml.mergeConflictSessionCookieDomain=The session cookie domain was defined inconsistently in multiple fragments with different values including fragment with name [{0}] located at [{1}] +webXml.mergeConflictSessionCookiePath=The session cookie path was defined inconsistently in multiple fragments with different values including fragment with name [{0}] located at [{1}] +webXml.mergeConflictSessionCookieComment=The session cookie comment was defined inconsistently in multiple fragments with different values including fragment with name [{0}] located at [{1}] +webXml.mergeConflictSessionCookieHttpOnly=The session cookie http-only flag was defined inconsistently in multiple fragments with different values including fragment with name [{0}] located at [{1}] +webXml.mergeConflictSessionCookieSecure=The session cookie secure flag was defined inconsistently in multiple fragments with different values including fragment with name [{0}] located at [{1}] +webXml.mergeConflictSessionCookieMaxAge=The session cookie max-age was defined inconsistently in multiple fragments with different values including fragment with name [{0}] located at [{1}] +webXml.mergeConflictSessionTimeout=The session timeout was defined inconsistently in multiple fragments with different values including fragment with name [{0}] located at [{1}] +webXml.mergeConflictSessionTrackingMode=The session tracking modes were defined inconsistently in multiple fragments including fragment with name [{0}] located at [{1}] +webXml.mergeConflictString=The [{0}] with name [{1}] was defined inconsistently in multiple fragments including fragment with name [{2}] located at [{3}] +webXml.multipleOther=Multiple others entries in ordering \ No newline at end of file Propchange: tomcat/trunk/java/org/apache/catalina/deploy/LocalStrings.properties ------------------------------------------------------------------------------ svn:eol-style = native Propchange: tomcat/trunk/java/org/apache/catalina/deploy/LocalStrings.properties ------------------------------------------------------------------------------ svn:keywords = Date Author Id Revision Copied: tomcat/trunk/java/org/apache/catalina/deploy/WebXml.java (from r899666, tomcat/trunk/java/org/apache/catalina/startup/WebXml.java) URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/deploy/WebXml.java?p2=tomcat/trunk/java/org/apache/catalina/deploy/WebXml.java&p1=tomcat/trunk/java/org/apache/catalina/startup/WebXml.java&r1=899666&r2=899737&rev=899737&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/catalina/startup/WebXml.java (original) +++ tomcat/trunk/java/org/apache/catalina/deploy/WebXml.java Fri Jan 15 18:04:22 2010 @@ -16,7 +16,7 @@ */ -package org.apache.catalina.startup; +package org.apache.catalina.deploy; import java.net.URL; import java.util.EnumSet; @@ -36,28 +36,6 @@ import org.apache.catalina.Context; import org.apache.catalina.Wrapper; -import org.apache.catalina.deploy.ContextEjb; -import org.apache.catalina.deploy.ContextEnvironment; -import org.apache.catalina.deploy.ContextHandler; -import org.apache.catalina.deploy.ContextLocalEjb; -import org.apache.catalina.deploy.ContextResource; -import org.apache.catalina.deploy.ContextResourceEnvRef; -import org.apache.catalina.deploy.ContextService; -import org.apache.catalina.deploy.ErrorPage; -import org.apache.catalina.deploy.FilterDef; -import org.apache.catalina.deploy.FilterMap; -import org.apache.catalina.deploy.InjectionTarget; -import org.apache.catalina.deploy.JspPropertyGroup; -import org.apache.catalina.deploy.LoginConfig; -import org.apache.catalina.deploy.MessageDestination; -import org.apache.catalina.deploy.MessageDestinationRef; -import org.apache.catalina.deploy.MultipartDef; -import org.apache.catalina.deploy.ResourceBase; -import org.apache.catalina.deploy.SecurityCollection; -import org.apache.catalina.deploy.SecurityConstraint; -import org.apache.catalina.deploy.SecurityRoleRef; -import org.apache.catalina.deploy.ServletDef; -import org.apache.catalina.deploy.SessionConfig; import org.apache.tomcat.util.res.StringManager; /** @@ -1949,7 +1927,7 @@ * @param fragments The map of fragment names to web fragments * @return Ordered list of web-fragment.xml files to process */ - protected static Set<WebXml> orderWebFragments(WebXml application, + public static Set<WebXml> orderWebFragments(WebXml application, Map<String,WebXml> fragments) { Set<WebXml> orderedFragments = new LinkedHashSet<WebXml>(); 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=899737&r1=899736&r2=899737&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java (original) +++ tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java Fri Jan 15 18:04:22 2010 @@ -70,6 +70,7 @@ import org.apache.catalina.deploy.LoginConfig; import org.apache.catalina.deploy.SecurityConstraint; import org.apache.catalina.deploy.ServletDef; +import org.apache.catalina.deploy.WebXml; import org.apache.juli.logging.Log; import org.apache.juli.logging.LogFactory; import org.apache.naming.resources.DirContextURLConnection; 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=899737&r1=899736&r2=899737&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/catalina/startup/LocalStrings.properties (original) +++ tomcat/trunk/java/org/apache/catalina/startup/LocalStrings.properties Fri Jan 15 18:04:22 2010 @@ -116,29 +116,4 @@ userConfig.stop=UserConfig: Processing STOP webRuleSet.absoluteOrdering=<absolute-ordering> element not valid in web-fragment.xml and will be ignored webRuleSet.relativeOrdering=<ordering> element not valid in web.xml and will be ignored -webXml.duplicateEnvEntry=Duplicate env-entry name [{0}] -webXml.duplicateFilter=Duplicate filter name [{0}] -webXml.duplicateMessageDestination=Duplicate message-destination name [{0}] -webXml.duplicateMessageDestinationRef=Duplicate message-destination-ref name [{0}] -webXml.duplicateResourceEnvRef=Duplicate resource-env-ref name [{0}] -webXml.duplicateResourceRef=Duplicate resource-ref name [{0}] -webXml.duplicateTaglibUri=Duplicate tag library URI [{0}] -webXml.reservedName=A web.xml file was detected using a reserved name [{0}]. The name element will be ignored for this fragment. -webXml.mergeConflictDisplayName=The display name was defined in multiple fragments with different values including fragment with name [{0}] located at [{1}] -webXml.mergeConflictErrorPage=The Error Page for [{0}] was defined inconsistently in multiple fragments including fragment with name [{1}] located at [{2}] -webXml.mergeConflictFilter=The Filter [{0}] was defined inconsistently in multiple fragments including fragment with name [{1}] located at [{2}] -webXml.mergeConflictLoginConfig=A LoginConfig was defined inconsistently in multiple fragments including fragment with name [{1}] located at [{2}] -webXml.mergeConflictOrder=Fragment relative ordering contains circular references. Thsi can be resolved by using absolute ordering in web.xml. -webXml.mergeConflictResource=The Resource [{0}] was defined inconsistently in multiple fragments including fragment with name [{1}] located at [{2}] -webXml.mergeConflictServlet=The Servlet [{0}] was defined inconsistently in multiple fragments including fragment with name [{1}] located at [{2}] -webXml.mergeConflictSessionCookieName=The session cookie name was defined inconsistently in multiple fragments with different values including fragment with name [{0}] located at [{1}] -webXml.mergeConflictSessionCookieDomain=The session cookie domain was defined inconsistently in multiple fragments with different values including fragment with name [{0}] located at [{1}] -webXml.mergeConflictSessionCookiePath=The session cookie path was defined inconsistently in multiple fragments with different values including fragment with name [{0}] located at [{1}] -webXml.mergeConflictSessionCookieComment=The session cookie comment was defined inconsistently in multiple fragments with different values including fragment with name [{0}] located at [{1}] -webXml.mergeConflictSessionCookieHttpOnly=The session cookie http-only flag was defined inconsistently in multiple fragments with different values including fragment with name [{0}] located at [{1}] -webXml.mergeConflictSessionCookieSecure=The session cookie secure flag was defined inconsistently in multiple fragments with different values including fragment with name [{0}] located at [{1}] -webXml.mergeConflictSessionCookieMaxAge=The session cookie max-age was defined inconsistently in multiple fragments with different values including fragment with name [{0}] located at [{1}] -webXml.mergeConflictSessionTimeout=The session timeout was defined inconsistently in multiple fragments with different values including fragment with name [{0}] located at [{1}] -webXml.mergeConflictSessionTrackingMode=The session tracking modes were defined inconsistently in multiple fragments including fragment with name [{0}] located at [{1}] -webXml.mergeConflictString=The [{0}] with name [{1}] was defined inconsistently in multiple fragments including fragment with name [{2}] located at [{3}] -webXml.multipleOther=Multiple others entries in ordering + Modified: tomcat/trunk/java/org/apache/catalina/startup/WebRuleSet.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/startup/WebRuleSet.java?rev=899737&r1=899736&r2=899737&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/catalina/startup/WebRuleSet.java (original) +++ tomcat/trunk/java/org/apache/catalina/startup/WebRuleSet.java Fri Jan 15 18:04:22 2010 @@ -26,6 +26,7 @@ import org.apache.catalina.deploy.ContextService; import org.apache.catalina.deploy.SecurityConstraint; import org.apache.catalina.deploy.ServletDef; +import org.apache.catalina.deploy.WebXml; import org.apache.tomcat.util.IntrospectionUtils; import org.apache.tomcat.util.digester.CallMethodRule; import org.apache.tomcat.util.digester.CallParamRule; Modified: tomcat/trunk/test/org/apache/TestAll.java URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/TestAll.java?rev=899737&r1=899736&r2=899737&view=diff ============================================================================== --- tomcat/trunk/test/org/apache/TestAll.java (original) +++ tomcat/trunk/test/org/apache/TestAll.java Fri Jan 15 18:04:22 2010 @@ -23,10 +23,10 @@ import org.apache.catalina.connector.TestKeepAliveCount; import org.apache.catalina.connector.TestRequest; import org.apache.catalina.core.TestStandardContext; +import org.apache.catalina.deploy.TestWebXml; import org.apache.catalina.ha.session.TestSerializablePrincipal; import org.apache.catalina.startup.TestTomcat; import org.apache.catalina.startup.TestTomcatSSL; -import org.apache.catalina.startup.TestWebXml; import org.apache.el.TestELEvaluation; import org.apache.el.TestELInJsp; import org.apache.el.lang.TestELSupport; Copied: tomcat/trunk/test/org/apache/catalina/deploy/TestWebXml.java (from r899666, tomcat/trunk/test/org/apache/catalina/startup/TestWebXml.java) URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/deploy/TestWebXml.java?p2=tomcat/trunk/test/org/apache/catalina/deploy/TestWebXml.java&p1=tomcat/trunk/test/org/apache/catalina/startup/TestWebXml.java&r1=899666&r2=899737&rev=899737&view=diff ============================================================================== --- tomcat/trunk/test/org/apache/catalina/startup/TestWebXml.java (original) +++ tomcat/trunk/test/org/apache/catalina/deploy/TestWebXml.java Fri Jan 15 18:04:22 2010 @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.catalina.startup; +package org.apache.catalina.deploy; import java.util.HashMap; import java.util.HashSet; @@ -23,6 +23,9 @@ import java.util.Map; import java.util.Set; +import org.apache.catalina.deploy.WebXml; +import org.apache.catalina.startup.ContextConfig; + import junit.framework.TestCase; /** --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org