Katana24
Katana24

Reputation: 8959

Can't run my Struts 2 Maven Project from Eclipse

I've got my Struts 2 project working fine. I built it via the command line and everything went well. My final step involved deploying to tomcat, again via command line:

mvn tomcat:run

In the folder with the pom file. That worked - i could hit the project via the browser. But when I imported it into Eclipse;

File -> Import -> Existing Maven Projects -> MyProject

the project imported but can't be run from Eclipse. The option under Run As -> Run on Server isn't there.

How do I get that option to appear?

Upvotes: 2

Views: 773

Answers (1)

Katana24
Katana24

Reputation: 8959

Figured it out. Right click on the project folder, scroll down to properties(or press the Alt+Enter shortcut on Windows) and select Project facets.

From there ensure that "Dynamic Web Module" is clicked and select "Apply." Now you should beable to run the project on the server.

Upvotes: 3

Related Questions