简体   繁体   English

Eclipse 无法使用选项启动 Tomcat:控制 Tomcat 安装

[英]Eclipse can't start Tomcat with option : takes control of Tomcat installation

I am using Ubuntu 14.04 and Eclipse Luna.我正在使用 Ubuntu 14.04 和 Eclipse Luna。 To work with Eclipse and Tomcat together followed this steps.要一起使用 Eclipse 和 Tomcat,请遵循以下步骤。

1) Installed Tomcat using : sudo apt-get install tomcat7 1)安装Tomcat使用:sudo apt-get install tomcat7

2) From eclipse tomcat start and stop works fine with below image radio button 1 option (double click server in eclipse). 2)从eclipse tomcat start and stop工作正常,下面的图像单选按钮1选项(在eclipse中双击服务器)。 But with option 1 browser find 404 to visit http://localhost:8080/但是使用选项 1 浏览器找到 404 访问http://localhost:8080/

3) Apply the option 2 :Use Tomcat installation(Take control of Tomcat installation) 3)应用选项2:使用Tomcat安装(控制Tomcat安装)

like the image below像下面的图片


在此处输入图片说明


It does not even start the server with radio option 2. When I tried to start server find error like this它甚至没有用无线电选项 2 启动服务器。当我尝试启动服务器时,发现这样的错误

在此处输入图片说明


I have tried to find solution from this link .我试图从这个链接找到解决方案。 Applied this but it does not worked for me.应用了这个,但它对我不起作用。

<workspace-directory>\.metadata\.plugins\org.eclipse.core.resources

Also tried to apply from link and changed port.还尝试从链接申请并更改端口。 but not worked.但没有工作。

Also Executed option like this :还执行了这样的选项:

cd~/workspaceEclipse/.metadata/.plugins/org.eclipse.core.runtime/.settings
rm org.eclipse.wst.server.core.prefs
rm org.eclipse.jst.server.tomcat.core.prefs
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

Can anyone know solution of this problem ?谁能知道这个问题的解决方案?

I'd recomment do avoid using eclipse with the Ubuntu repository Tomcat.我建议避免将 Eclipse 与 Ubuntu 存储库 Tomcat 一起使用。

Unless you run eclipse as root you will not be able to publish your configuration.除非您以 root 身份运行 eclipse,否则您将无法发布您的配置。

Download tomcat manually, unpack in your home folder and you should get rid of your problem手动下载tomcat,解压到你的主目录,你的问题就解决了

You are having file permission issue.您遇到文件权限问题。
Just go to /usr/share/tomcat by the user you logged in and give recursive read+ write permission to sub-directories for the user by which you running eclipse.只需通过您登录的用户转到/usr/share/tomcat并为您运行 eclipse 的用户授予对子目录的递归读写权限。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM