Eclipse下发布web遇到的("")的问题

时间:2025-02-18 10:06:58

eclipse发布web项目时不如myeclipse方便,但由于eclipse的免费,我还是选择使用eclipse,在部署时遇到两个问题:

1、发布的项目在tomcat的webapps下找不到?

答:eclipse默认把web项目发布在workspace下的
F:\\中的tmp0或tep1中,所以需要:
新建一个server,在Server Locations中选择“Use Tomcat installation(takes control of Tomcat installation)”,并且修改Server path为tomcat文件夹的路径,Deploy path为webapps。

2、在项目中用到(“”),但是显示的路径是eclipse的workspace的路径?

答:双击orF3打开tomcat server,在General Information中点击launch configuration,然后选择Argument中最下面的Work directory,在other中选择tomcat中bin文件夹的路径,eg:

D:\apache-tomcat-7.0.64\bin