Web. XML Webapprootkey------------------------------------------------------------------------------------------------1 , Web. XML configuration webapprootkey webapp.root The string "Webapp.root" can be arbitrarily written in any string. If you do not configure the default value is "Webapp.root". You can use System.getproperty ("Webapp.root") to dynamically get the project's running path. General return results For example:/usr/local/tomcat6/webapps/project Name 2, resolve the following error The Web project deployed in the same container, to configure a different , cannot be duplicated, otherwise the report resembles the following error: Web App root system property already set to different value: ' Webapp.root ' = [/home/user/tomcat/webapps/p ROJECT1/] instead of [/home/user/tomcat/webapps/project2/]-Choose unique values for the ' Webapprootkey ' Context-param in Your web files! meaning "Webapp.root" This key has been pointed to the project 1, can not point to the project 2.3, loading mode spring through Org.springframework.web.util.WebAppRootListener The project path at which this listener comes to run. However, if the Org.springframework.web.util.Log4jConfigListener listener is already configured in Web. XML, you do not need to configure Webapprootlistener. Because Log4jconfiglistener already contains the general configuration type of the Webapprootlistener function, the following example: XML code log4jconfiglocation web-inf/conf/log4j.properties log4jrefreshinterval Org.springframework.web.util.Log4jConfigListener 4, at run time dynamically find the path of the project in the Log4j.properties configuration file, you can use the following way ${webapp.root}: log4j.appender.file.file=${webapp.root}/ Web-inf/logs/sample.log can dynamically find the path to the project at run time
(EXT) Web. XML Webapprootkey