stumped
stumped

Reputation: 489

Eclipse: Can't run project on Tomcat server

I have installed the Tomcat plugin and it works if i create a New Dynamic Web Project, and import an existing basic maven webapp into it. I can run it with the option of running it "as server".

However, when i did an Import existing project, in Eclipse, of an existing basic maven app, I had to right-click on the Project, choose Configure and convert it to a Faceted project, then right-click on the Project, choose Properties, and choose Targeted runtimes, and choose Tomcat and JRE. However, i still cannot run the project, "as server". When i click Run, i just see Java Applet, Java Application and JUnit Test as the options with which to run the project. I don't see Server.

Upvotes: 5

Views: 22004

Answers (3)

Adi
Adi

Reputation: 921

Navigate to Project > Properties > Project Facets .

In the Runtimes Tab check the apache version which is installed in your lappy, and uncheck others .

Upvotes: 1

digitaljoel
digitaljoel

Reputation: 26574

Import the project as an existing maven project (you'll need m2e installed and either m2e-wtp or webby) and the maven configurators should set it up as a dynamic web project for you and get you ready to go. Then with m2e you can "run on server" or with webby you can "run as webby"

Upvotes: 0

stumped
stumped

Reputation: 489

Looks like the answer is: May be Dynamic Web Module in Project Facet is not selected

Go to :- Project > Properties > Project Facets > check Dynamic Web Module

Answer from Mohit Saluja for the following question: Eclipse Juno, maven project not able to run on server

Upvotes: 6

Related Questions