效果:
![](http://images0.cnblogs.com/blog/479886/201412/121518284934880.png)
找到项目所在的路径,打开.settings文件,在该文件中找到org.eclipse.wst.common.component文件;
查看内容
<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
<wb-module deploy-name="cpp-scf-manager">
<wb-resource deploy-path="/" source-path="/WebRoot" tag="defaultRootSource"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/resources"/>
<dependent-module archiveName="cpp-scf-public.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/cpp-scf-public/cpp-scf-public">
<dependency-type>uses</dependency-type>
</dependent-module>
<property name="java-output-path" value="/cpp-scf-manager/WebRoot/WEB-INF/classes"/>
<property name="me-merge-utility-modules" value="true"/>
<property name="context-root" value="/cpp-scf-manager"/>
</wb-module>
</project-modules>
<dependent-module archiveName="cpp-scf-public.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/cpp-scf-public/cpp-scf-public">
<dependency-type>uses</dependency-type>
</dependent-module>
这个是配置关联项目的内容;就是子项目;相当于把子项目达成了jar文件并映入的父项目的lib包下;
java-output-path表示java编译后输出的路径;
将java项目引入到web项目
将一个项目的class文件发布到另一个项目的WEB-INF中
利用MyEclipse自带的部署功能:![](//images0.cnblogs.com/blog/479886/201412/121518314159139.jpg)
![](//images0.cnblogs.com/blog/479886/201412/121518343374398.png)
![](//images0.cnblogs.com/blog/479886/201412/121518351341042.png)
![](//images0.cnblogs.com/blog/479886/201412/121518357756871.png)
两个项目融合
方法2:
利用MyEclipse自带的部署功能:
1、右击项目然后选择properties
![](http://images0.cnblogs.com/blog/479886/201412/121518314159139.jpg)
2、选择MyEclipse下方的Deployment assemble 然后点击add按钮
![](http://images0.cnblogs.com/blog/479886/201412/121518343374398.png)
3、然后选择project并点击next按钮
![](http://images0.cnblogs.com/blog/479886/201412/121518351341042.png)
4、选中你想要添加的项目名称;最后点击Finish即可
![](http://images0.cnblogs.com/blog/479886/201412/121518357756871.png)