I am using the sample project code here that i've downloaded from the following: http://javahash.com/spring-4-mvc-hello-world-tutorial-full-example/
Direct link here: http://javahash.com/wp-content/uploads/2014/02/Spring4MVCHelloWorld.zip
I have Eclipse Kepler SR2 (J2EE), Tomcat 7 64-bit, Java 7.
The project does not appear to be a web project, so I add "Dynamic Web Module" version 3.0 and "Java" (version 1.7) to it. I right click, maven install, which appears to run fine. When I try to actually deploy it on tomcat, it does not give any errors in the console, but when the browser window pops up it shows a 404
http://localhost:8080/Spring4MVCHelloWorld/
HTTP Status 404 - /Spring4MVCHelloWorld/
--------------------------------------------------------------------------------
type Status report
message /Spring4MVCHelloWorld/
description The requested resource is not available.
--------------------------------------------------------------------------------
Apache Tomcat/6.0.39
That said, how do I get this "basic" example running in eclipse? Anyone able to get this working successfully? It feels like it should be more trivial than the 5 hours I've spent on trying to get this sample code working to no avail.
UPDATE: Still continues to fail despite using Tomcat 7.0 server.
- Download the sample, extract contents to workspace directory.
- "Import Existing Project" in Eclipse
- Since there is no "Run On Server" option, I right click on the imported project directory and hit "Properties".
- I go to "Project Facets" and check 2 things: "Dynamic Web Module" (3.0) and "Java" (1.7) and hit apply then "Ok".
- I right click on the project Spring4MVCHelloWorld and click "Maven"->"Update Project". Then I click "Run On Server".
- There are no errors in the console, but the web browser that pops up in eclipse shows a HTTP STATUS 404.
I tried going to:
http://localhost:8080/Spring4MVCHelloWord/hello
and the same:
HTTP Status 404 - /Spring4MVCHelloWorld/hello
shows up, but the tomcat shows up as:
Apache Tomcat/7.0.53
Note that this is the 64-bit version. What steps am I missing? How do I get around this silent failing?