Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

When adding resources to a Tomcat server in Eclipse, what can be a resource?

When I bring up the "Add and Remove" resource dialog to add things like .war files (I think war is an example), I would like to know what sort of things constitute "resources" and how Eclipse identifies them as such. I am working on a new project that has a fairly complex Maven build and it is not clear to me what exactly I am adding to Tomcat. Could a directory be a resource? A pom file?

I should mention that I see a SNAPSHOT file (actually, the thing named this seems to be a Windows folder which does not hold jars) as a resource that can be added but the build does not seem to be producing a war or jar file which is named in this way. What does get added if I choose to add this resource seems to be composed of a bunch of jars or wars.

like image 465
Jeff Avatar asked Feb 04 '17 00:02

Jeff


People also ask

How to add Tomcat to eclipse?

Add Tomcat to Eclipse. It’s time to open Eclipse. Once opened open server view (To know more about views click here) Currently there is no server available. You need to add a new one. Click the link “New Server Wizard“. It will show the popup window. Select the proper tomcat version.

How to add a web project to Tomcat server?

If you have any web project which you want to add to the tomcat server you can do that here on the next screen. If there is any web application in the given workspace then it will get displayed on the left side as below. If you want to add a web application in tomcat select the application and click the Add button.

How do I add spring rest and Tomcat to a project?

Consequently, we have to make sure that the Dynamic Web Module facet is enabled for the project before we can add them. So let's right-click on the tomcat server in the Servers view and choose the Add and Remove… menu item. Then, on the screen that follows, we'll select the spring-rest web module:

How to add Tomcat to targeted runtimes?

Right click on the project, select properties and then select "Targeted Runtimes". Check if Tomcat is selected here. Show activity on this post. The issue is it is missing Dynamic Web Module facet definition.


1 Answers

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

like image 65
lax1089 Avatar answered Oct 02 '22 21:10

lax1089