Eclipse Server不可设置tomcat7

!!!!再次之前需要保证tomcat下的文件和eclipse下的文件有rwx权限!!!!
点击Server不可添加Tomcat服务器。ServerName无法编辑。
- 关闭Eclipse
- 打开WorkSpace所在的位置。
{workspace-directory}/.metadata/.plugins/org.eclipse.core.runtime/.settings
- 删除以下文件
org.eclipse.wst.server.core.prefs
org.eclipse.jst.server.tomcat.core.prefs
- 重启 Eclipse,即可解决所有问题。

– Close Eclipse
– Go to your Eclipse workspace directory
– Then go to directory .metadata/.plugins/org.eclipse.core.runtime/.settings
– In Ubuntu, I do it by: cd ~/workspace/.metadata/.plugins/org.eclipse.core.runtime/.settings
– Delete the following two files:
– org.eclipse.wst.server.core.prefs
– org.eclipse.jst.server.tomcat.core.prefs
– You can do it by the following command:
rm org.eclipse.wst.server.core.prefs
rm org.eclipse.jst.server.tomcat.core.prefs
– Start Eclipse


If the above solution did not solve the problem then you can try the following solution which contains creating some softlinks along with deleting the above mentioned files.

– Run the following commands in terminal

cd ~/workspace/.metadata/.plugins/org.eclipse.core.runtime/.settings/
rm org.eclipse.jst.server.tomcat.core.prefs
rm org.eclipse.wst.server.core.prefs
cd /usr/share/tomcat7
sudo service tomcat7 stop
sudo update-rc.d tomcat7 disable
sudo ln -s /var/lib/tomcat7/conf conf
sudo ln -s /etc/tomcat7/policy.d/03catalina.policy conf/catalina.policy
sudo ln -s /var/log/tomcat7 log
sudo chmod -R 777 /usr/share/tomcat7/conf
sudo ln -s /var/lib/tomcat7/common common
sudo ln -s /var/lib/tomcat7/server server
sudo ln -s /var/lib/tomcat7/shared shared

– Restart eclipse
– In Project Explorer of Eclipse, you can see ‘Servers’. Right click and delete it.
– Re-add the Server (File -> New -> Other -> Server)
– Now your project on Eclipse should run fine.


Suggesting one more way, in the org.eclipse.jst.server.tomcat.core.prefs file as mentioned above rightly, we have an issue. Just open it with any text editor and put the location of your server into inverted commas. e.g. : locationorg.eclipse.jst.server.tomcat.runtime.70=”D:/Apache/Tomcat 7″.
After that restart eclipse and delete server. Create a new server. It should run. Worked for me. (Note : the spaces in folder name are the main issue.)

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • Spring Cloud为开发人员提供了快速构建分布式系统中一些常见模式的工具(例如配置管理,服务发现,断路器,智...
    卡卡罗2017阅读 134,991评论 19 139
  • 解决方案: 在 eclipse.ini 里面添加一行配置: --add-modules=ALL-SYSTEM //...
    光剑书架上的书阅读 1,121评论 0 1
  • 子 兮 中午吃饭,有个地方同事多次推荐。 于是,一起前往。 七拐八拐,一条巷子深处,终于找到了这家饭馆,巷子仅能停...
    北六月阅读 288评论 0 0
  • 四天的空闲 与骚骚奔向北海 应该是我所经历的最囧之旅 株洲汇合后在火车站闲聊着等列车的到来 一次次的晚点我们终于在...
    胖T阅读 760评论 9 3
  • MindManager2016思维导图中的拼写检查功能如同大部分标准拼写检查器,运行拼写检查(相关文章请参考详解M...
    一只流浪喵阅读 653评论 0 0