Eclipse Tomcat配置

今天在新安装的Eclipse启动刚配置好的Tomcat8竟然报如下错误:

Publishing the configuration... 
  Error copying file to /opt/apache-tomcat-8.0.30/backup/catalina.policy
...

找了找,原来是在eclipse中配置tomcat8时,Server Locations我选择应用Use tomcat installed,而eclipse当然需要访问你安装的tomcat目录做相应操作,然而它使用user用户却拿不到权限,就这样悲催了。好,即然这样就修改下tomcat安装目录为user可访:

sudo chown user:user -R apache-tomcat-8.0.30

注意:配置tomcat时,其下的conf目录下的所有文件,建议将权限修改为664哦,不然你就等着报错吧。


可是在往服务器Add and Remove从MyEclipse迁移过来的项目时,又开始报错了:

There are no resources that can be added or removed from the server.

原因是eclipse没办法识别你的项目为动态的web项目,所以参考下面进行设置:

For this you need to update your Project Facets setting. Right Click on Project->Go to Properties->Select Project Facets from left navigation. If it is not open…click on the link, Check the Dynamic Web Module Check Box and select the respective version (Probably 2.4). Click on Apply Button and then Click on OK.

当然你会发现,如果是用MyEclipse创建的项目,用上述方法不可行,那你就选择Configuration中的Dynamic Web ...进行应用吧,最后你还需要修改WebRoot(MyEclipse) --> WebContent(Eclipse)哦。

参考链接:error-in-publishing-the-configuration-in-eclipse & there-are-no-resources-that-can-be-added-or-removed-from-the-server

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值