2.工程中,共通工程为B 引入共通工程的为A
A--->Properties---->Java Build Path---->Projects---->add B
A--->Properties--->Tomcat---->DevLoader Classpath---->B/bin
3.A--->Tomcat project---->Update context definition
4.重新启动tomcat
控制台输出:
[DevLoader] Starting DevLoader
[DevLoader] projectdir=D:\work\j2ee_workspace\TravelManagementWeb\WebContent
[DevLoader] added file:/D:/work/j2ee_workspace/TravelCommon/bin/
5.Tomcat 7.0\conf\Catalina\localhost中的工程文件xml
<Context path="/TravelService" reloadable="true" docBase="D:\work\j2ee_workspace\TravelService\WebContent" workDir="D:\work\j2ee_workspace\TravelService\work" >
<Loader className="org.apache.catalina.loader.DevLoader" reloadable="true" debug="1" useSystemClassLoaderAsParent="false" />
</Context>