简体   繁体   中英

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.

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

Navigate to Project > Properties > Project Facets .

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

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"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM