异常 之 java.lang.IllegalArgumentException:Document base *** does not exist or is not a readable
这是由于在webapps里面将项目删除,却没有在其它相应的工作目录删除
确定3点:
1.该项目的War文件从***\apache-tomcat-6.0.16\webapps 移出;
2.该项目的某些配置从 ***apache-tomcat-6.0.16\work\Catalina\localhost 移除;
3.该项目的配置文件,目录: ***\apache-tomcat-6.0.16\conf\Catalina\localhost移除。
多个tomcat运行在一台机器上
将tomcat的server.xml中的
shutdown端口
http端口
AJP端口
再运行即可,如果还不行,可以在startbat最后加个pause看看是不是jre等的问题
一个tomcat跑多个实例
看到网上写有两种方式,一种为配置多个service,一种为一个service配置多个connector
<Server>
<Service name="aaa">
<Connector port="8080" maxThreads="150" minSpareThreads="10" maxSpareThreads="75"
enableLookups="false" redirectPort="38443" acceptCount="100"
debug="9" connectionTimeout="20000"
disableUploadTimeout="true" />
</Service>
<Service name="bbb">
<Connector port="28080"
maxThreads="150" minSpareThreads="10" maxSpareThreads="75"
enableLookups="false" redirectPort="48443" acceptCount="100"
debug="9" connectionTimeout="20000"
disableUploadTimeout="true" />
</Service>
</Server>
<Service name="Catalina2">
<Connector port="8081"
maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
enableLookups="false" redirectPort="8443" acceptCount="100"
debug="0" connectionTimeout="20000"
disableUploadTimeout="true" />
<Connector port="8010"
enableLookups="false" redirectPort="8443" debug="0"
protocol="AJP/1.3" />
<Engine name="Catalina" defaultHost="localhost" debug="0">
<Logger className="org.apache.catalina.logger.FileLogger"
prefix="catalina2_log." suffix=".txt"
timestamp="true"/>
<Realm className="org.apache.catalina.realm.UserDatabaseRealm"
debug="0" resourceName="UserDatabase"/>
<Host name="localhost" debug="0" appBase="webapps2"
unpackWARs="true" autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false">
<Logger className="org.apache.catalina.logger.FileLogger"
directory="logs" prefix="localhost2_log." suffix=".txt"
timestamp="true"/>
</Host>
</Engine>
</Service>
REFERENCES: http://www.cnblogs.com/skyme/archive/2011/06/28/2091974.html
http://wenku.baidu.com/view/f0285a27192e45361066f510.html