问题
I want to add latest tomcat-7.0.42 in my eclipse. Probably eclipse tomcat server adapter 7 only supports tomcat version upto 7.0.12 ..

So please help me how can I configure my eclipse with tomcat-7.0.42
回答1:
You are specifying tomcat source directory.
You need to specify tomcat binary installation root directory, also known as CATALINA_HOME.
Usually, this is where you untar apache-tomcat-7.0.42.tar.gz
file.
回答2:
This happened to me because Tomcat was still in the process of downloading (Download and Install
). The message disappeared after a few minutes.
The eclipse window should really have some type of progress indicator showing download status.
回答3:
For LINUX the installation directory for Tomcat 7 is: /usr/share/tomcat7
Please use this configuration.
More here: http://gridlab.dimes.unical.it/lackovic/eclipse-tomcat-ubuntu-jersey/
回答4:
To recognise your Tomcat installation folder, Eclipse is scanning for the following files:
conf/catalina.policy
conf/server.xml
conf/web.xml
conf/context.xml
conf/tomcat-users.xml
conf/catalina.policy
conf/catalina.properties
lib/catalina.jar
so make sure you're pointing to the right place and have the right read permissions.
E.g.
- OS X (if installed via
brew
), it's:/usr/local/opt/tomcat/libexec
- Linux/Ubuntu: see: Tomcat and Eclipse Integration Error
回答5:
Probably, you are trying to point the tomcat directory having the source folder. Please download the tomcat binary version from here .For Linux environments, there you can find .zip and .tar.gz files under core section. Please download and extract them. after that, if you point this extracted directory, eclipse will be able to identify the tomcat version. Eclipse was not able to find the version of tomcat, since the directory you pointed out didn't contain the conf folder. Hope this helps!
回答6:
As soon as you provide the directory where Tomcat needs to be installed and click ok you can notice download and installation starts in the progress tab of Eclipse.

Let the process complete.The error will automatically disappear.

Note: It is not mandatory to name your folder CATALINA_HOME
. I have tested this with windows. Cannot assert the same for Linux but IMO same rule should apply.
回答7:
I got the same error and resolved it by giving enough permissions to the folder. I gave full permissions by (you can try limited permissions which is enough for eclipse to run tomcat)
sudo chmod -R 777 apache-tomcat-8.5.33/
FYI, I encountered this error on my mac, but I think it should be same for ubuntu system too.
回答8:
Just in case... Apache Tomcat 8.5.X is not compatible with Apache Tomcat 8.0 server selection in eclipse. And it gives this error.
回答9:
Go to "Window -> preferences -> Server -> Runtime Environments"
Remove the existing servers they might not have downloaded completely.
Add new Server
回答10:
I am on MacOS and installed tomcat using homebrew, Following path fixed my problem
/usr/local/Cellar/tomcat/9.0.14/libexec
回答11:
For Windows Users,
Use the Tomcat Service Installer from the Apache tomcat downloads page. You will get a .exe file. which Installs the service for windows. It will usually install Apache tomcat at "C:\Program Files\Apache Software Foundation\Tomcat 8.0" and its easily recognized in eclipse.
回答12:
Having installed tomcat with brew the solution for me was:
sudo chmod -R 777 /usr/local/Cellar/tomcat/<your_version>
回答13:
You are pointing to the source directory. You can run a build by running ant from that same directory, then add '\output\build' to the end of the installation directory path.
回答14:
It may be due to the access of the tomcat installation path(C:\Program Files\Apache Software Foundation\Tomcat 9.0) wasn't available with the current user.
回答15:
In my case I used wrong directory, the right one is lib exec and my path: /usr/local/Cellar/tomcat@7/7.0.96/libexec
回答16:
it throws the same error for me too that brought me here.
However, I just waited for some time and it got installed without doing anything.
hope this helps
来源:https://stackoverflow.com/questions/17745834/unknown-version-of-tomcat-was-specified-with-tomcat-7-0-42