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.
In the Java EE perspective of Eclipse, you will find the Servers tab at the bottom.
If you goto "Window > Show View > Other..." and then type Servers in the filter, does it show up? Also make sure you downloaded the "Eclipse For Java EE Developers" package as I do not believe the "Eclipse for Java Developers" contains the Servers view. Show activity on this post. Restart Eclipse.
Go to the project in the Project Explorer, select the web project, right click and select "Run As", you will see Apache Tomcat, create runtime configuration for the web project by selecting "New" button.
First make sure that you made a regular "Java Project", and not something else. If there's something wrong with the build configuration, which i guess there is, go to: Run > Run Configurations... On the left you will see a list of configurations, make sure your configuration runs as a "Java Application".
Did you create a Web Project? If you right click on the project and go to Properties > Project Facets is Dynamic Web Module selected?
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,
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With