Cannot add a project to a Tomcat server in Eclipse
You didn't create your project as "Dynamic Web Project", so Eclipse doesn't recognize it like a web project. Create a new "Dynamic Web Project" or go to Properties → Projects Facets and check Dynamic Web Module.
- Right click on the project name in the Package Explorer view.
- Select Properties
- Select Project Facets
- Click on the Runtimes tab
- Check Server
- Click on OK
And now:
- Right click on the server name in the Servers view
- Click on Add and Remove...
- Move resources to the right column
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.