Trying to add Tomcat v7 to eclipse, but cannot find it in “Define a New Server” window

女生的网名这么多〃 提交于 2019-12-10 21:07:47

问题


I'm trying to create a dynamic web project in eclipse, but my version of Apache Tomcat is v7 and the list of abvailable tomcat servers when I try to define the new server are from v3.2 to v6.0, there is nothing higher.

I tried to click "Download additional server adapters" but could not find any updated versions of tomcat there. I have a tomcat server working on my machine, but I wanted to link it with Eclipse to make development easier.

I've also tried going to Window -> Preferences -> Server Tab -> Installed Runtimes tab and clicking search, then selecting my tomcat installation folder. It doesn't add anything and doesn't give any error.

Any ideas of how to do this? I think the version difference may be the reason I can't get my eclipse projects to compile directly to the tomcat server and I can't figure out how to add it.


回答1:


You need to be using a version of Eclipse IDE for Java EE Developers equal to or greater than 3.6 (Helios). Other builds and earlier versions do not have the adapter for Tomcat 7. Make sure you are running the latest version of the web tools as well. Also try letting eclipse search for it under server->runtime environment. It may detect it for you, if you are running a new enough version of EE.




回答2:


You have to use Eclipse 3.7 aka Indigo. Also, make sure you download the EE version as you'll have everything you need to build web services.




回答3:


@Manjush

Thanks for the pointer. Editing in Windows preferences is a good thought. For me, it dint allow to add because I had given a wrong path of the server. I am using Eclipse Kepler.

Windows->Preferences->Servers-->Runtime Environments-->Add



回答4:


Go to Windows->Preferences->Servers->Installed Runtimes and add (point to) an installed Tomcat 7 installation on your system.



来源:https://stackoverflow.com/questions/7894926/trying-to-add-tomcat-v7-to-eclipse-but-cannot-find-it-in-define-a-new-server

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!