server.xml 100% 8226 8.0KB/s 00:00
[root@TomcatA ~]#
对比TomcatA需要修改的地方
1 2 3
<Engine name="Catalina"defaultHost="localhost" jvmRoute="TomcatB"> <ReceiverclassName="org.apache.catalina.tribes.transport.nio.NioReceiver" address="192.168.0.21"
添加应用程序自己的web.xml配置文件,需要有<distributable/>这个标签
[root@TomcatA ~]# vim/usr/share/tomcat/webapps/ROOT/WEB-INF/web.xml
[root@TomcatA ~]# cat/usr/share/tomcat/webapps/ROOT/WEB-INF/web.xml
1 2 3 4 5 6 7 8 9 10 11 12
<?xml version="1.0"encoding="ISO-8859-1"?> <web-appxmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" version="3.0" metadata-complete="true"> <distributable/> </web-app>
[root@TomcatA ~]# scp/usr/share/tomcat/webapps/ROOT/WEB-INF/web.xml192.168.0.21:/usr/share/tomcat/webapps/ROOT/WEB-INF
root@192.168.0.21's password: