[java] Run on server option not appearing in Eclipse

I'm learning SpringMVC framework and checked out a copy of their code: https://src.springframework.org/svn/spring-samples/mvc-basic/trunk/ I can do maven build, install and everything. But on Eclipse, run on server option never appeared. I have tomcat server up and running, also got plugin for eclipse. Why run on server option is missing? This is a Ubuntu machine. When I tried the exact same thing on my Windows machine, everything was fine. It has the same version of eclipse and all sorts of plugins installed as the Ubuntu machine. I was able to launch it from Eclipse "run on server" option there.

Can someone help me to figure out why? Thanks.

This question is related to java eclipse

The answer is


I had a similar issue. The Maven projects have different structure than "Dynamic Web Projects". Eclipse knows only how to deploy the Dynamic Web Projects (project structure used by Web Tools Platform).

In order to solve this and tell Eclipse how to deploy a "maven style" projects, you have to install the M2E Eclipse WTP plugin (I suppose you are already using the m2e plugin).

To install: Preferences->Maven->Discovery->Open Catalog and choose the WTP plugin.

After reinstalling, you will be able to "run on server" those projects which are maven web projects.

Hope that helps,


Perhaps you lost some configuration, check jar dependencies in properties -> Deployment Assembly. If you miss something, try to add dependencies again.

in my case, fixing this, Run on Server appear again.


Right click on the project, go to "Run as", select "Run configurations" and create a run configuration.


Follow the below steps:

1) Right click on your maven project.

2) Select Maven

3) Update Project

4) check the

  • update project configuration from pom.xml

  • refresh workspace resources from local filesystem.

  • clean projects.

That's it.


For me worked: Right click on project > Properties > Project Faces > change Configuration from "custom" to "Default configuration for Apache Tomcat v7.0" > OK and then Run on Server option has appeared.


There is only 1 thing that fixed this for me. In the pom.xml, add the tag:

<packaging>war</packaging>

Then after saving that, when you right click on the project you should now see the "Run As... Run on Server" option showing up.


The topic is old but today I was facing the same problem, I imported a Maven project and when I tried to add it to Tomcat it did not show the project. What worked for me:
Properties >> Project Facets and then check the options:
Dynamic Web Module + Java and JavaScript (optional) and then click in apply. I hope it will help someone :)


I had to do the following

  1. remove /WebContent from Deployment Assembly and add /src/main/webapp
  2. Add Library (Properties->Java Build Path->Libraries), Server Runtimes

This got me working, in addition to @alanbartczak answer.


Did you create a Web Project? If you right click on the project and go to Properties > Project Facets is Dynamic Web Module selected?


Do you see any servers in server view in eclipse? Probably simply you have not created any server instances.


we have to install the M2E Eclipse WTP plugin To install: Preferences->Maven->Discovery->Open Catalog and choose the WTP plugin.

And restart eclipse


I was facing similar issue when i created a new workspace in STS. Project => right click => Maven option was also missing. I tried this below steps and it worked.. hope it helps someone else. Project => right click => configure => convert to maven project and then the option to run on server appeared.