I'm trying to deploy a multi-module Maven project from Eclipse to a local Tomcat. The project has the following structure:
root [packaging: pom]
|
|--- domain [packaging: jar]
|
|--- manager [packaging: jar]
|
|--- web [packaging: war]
I import all the projects into Eclipse, then add the "Dynamic Web Module" facet to the web project
In the Runtimes tab of the same dialog, I configure the project to use a (local) Apache Tomcat v6.0 runtime.
I then right-click on the project and choose "Run As -> Run on Server" from the menu. In the following dialog I (again?) choose "Tomcat v6.0 Server"
In the following dialog, I add the web project to the list of configured projects
When I click "Finish", it appears from the console messages that the server has started, but when I go to http://localhost:8080/web/ in a browser I get a 404. I also tried http://localhost:8080/ and that also returns a 404, what am I doing wrong?
When I added the dynamic module Eclipse incorrectly created a WebContent directory. I deleted this directory and made the following change to the file in the .settings
directory named org.eclipse.wst.common.component
<wb-resource deploy-path="/" source-path="/src/main/webapp"/>
<!--
<wb-resource deploy-path="/" source-path="/WebContent"/>
-->
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