Cannot add a project to a tomcat server in eclipse

2019-01-22 02:16发布

I cannot add my project to a server in eclipse - why is that?

I installed all necessary tools (Web Dev, Java EE, Server Adapters, Tomcat itself, everything)

I configured the runtime environments, adjusted all Java Versions to JDK 6 (because it should run on Tomcat 6) but still the left side of the dialogue where I could add recources is empty when creating a new server.

What else could I try?

PS: Using Juno on W7 Prof.

10条回答
唯我独甜
2楼-- · 2019-01-22 02:34
  1. Right-click on project
  2. Go to properties => project factes
  3. Click on runtime tab
  4. Check the box of the server
  5. Then ok

Close the eclipse and start the the server you will able to see and run the project.

查看更多
乱世女痞
3楼-- · 2019-01-22 02:35

If you are able to see the project in Eclipse project explorer but unable to see the project while adding the project to the web server, follow project properties -> Project Facets, make sure Dynamic Web Module & Java were ticked.

查看更多
在下西门庆
4楼-- · 2019-01-22 02:36

1 .right click on project name in Package Explorer view.
2. select Properties
3. Select Project Facets
4. Click on Runtimes tab
5. check server
6. Click on OK

And now :

  1. right click on server name in Servers view
  2. click on Add and Remove ...
  3. move resources to the right column
查看更多
爷、活的狠高调
5楼-- · 2019-01-22 02:38

For me: It was Eclipse mars which does not support jdk7 so I added jdk8. It worked.

查看更多
一纸荒年 Trace。
6楼-- · 2019-01-22 02:42

You didn't create your project as "Dynamic Web Project", so Eclipse doesn't recognize it like web project. Create new "Dynamic Web Project" or go to Properties -> Projects Facets and check Dynamic Web Module

查看更多
The star\"
7楼-- · 2019-01-22 02:43

I fixed this issue as adding Dynamic Web Module to Project Facets

  1. right click on project name in Package Explorer view.
  2. select Properties
  3. Select Project Facets
  4. Activate Dynamic Web Module
  5. Click on OK
查看更多
登录 后发表回答