user2054833
user2054833

Reputation: 2165

Running Maven Struts2 app on tomcat

I created a Struts2 App using Eclipse M2 Maven plugin but there is no option to run the project on my tomcat server. I tried including the server runtime libraries in the projects build path but that doesn't work. How can I solve this problem?

Upvotes: 2

Views: 540

Answers (3)

Aleksandr M
Aleksandr M

Reputation: 24396

In order to run project on server in eclipse, project must be in faceted form with Dynamic Web Module enabled. To convert project to faceted form: right click on project -> Properties -> Project Facets -> Convert to faceted form... -> check Java and Dynamic Web Module.

Upvotes: 2

Bhushan Bhangale
Bhushan Bhangale

Reputation: 10987

Right click on the project and then Run As > Run on Server.

If you do not see that option that means your project is not configured as Web Application.

Upvotes: 0

Sajith Silva
Sajith Silva

Reputation: 823

When you build the project, it should create an output, a war file or extracted war file. You need to deploy this on the server then only you can see the application. In eclipse I believe you can configure an server. Once you have configured a server in eclipse you can tell it to look for your project build output and deploy it.

Upvotes: 1

Related Questions