I am trying to follow the basic tutorial for Spring MVC but got lost at creating a new project in Eclipse.
It seems to me that most tutorials assume you know how to create a Spring Project in Eclipse.
Any advice on where to get started or tutorials which explain how to set up Eclipse would be appreciated.
5 Answers
You want to create a "Dynamic Web Project". Follow the steps here: Spring MVC Tutorial with Eclipse and Tomcat.
Also, here is the Eclipse documentation for Dynamic Web Projects: http://help.eclipse.org/help32/index.jsp?topic=/org.eclipse.wst.webtools.doc.user/topics/ccwebprj.html

- 80,905
- 18
- 123
- 145
-
3First link is dead. – lealceldeiro Apr 26 '19 at 09:05
-
... and gets detected by malwarebytes as a trojan – Camilo Martinez M. Sep 12 '21 at 05:07
Download Spring STS (SpringSource Tool Suite) and choose Spring Template Project from the Dashboard. This is the easiest way to get a preconfigured spring mvc project, ready to go.

- 2,636
- 5
- 42
- 54
You don't necessarily have to create a Spring project. Almost all Java web applications have he same project structure. In almost every project I create, I automatically add these source folder:
- src/main/java
- src/main/resources
- src/test/java
- src/test/resources
- src/main/webapp*
src/main/webapp isn't actually a source folder. The web.xml file under src/main/webapp/WEB-INF will allow you to run your java application on any Java enabled web server (Tomcat, Jetty, etc.). I typically add the Jetty Plugin to my POM (assuming you use Maven), and launch the web app in development using mvn clean jetty:run.
-
15I agree. Don't create a "Spring Project", and don't use SpringIDE. If you really want to learn Spring, create a dynamic web project, and then start loading in JARs, configs, etc., and learn Spring MVC from the ground up. – Jul 11 '11 at 19:52
This is the easiest way :
step 1) install Spring Tool Suite (STS) for eclipse (version 3.7.0RELEASE or above) To do this you can go to Help >> eclipse market place , then type Spring Tool suite in search box.
step 2) now go to file >> new >> spring project as shown in the image below
step 3)now choose the template as "spring MVC Project" and give a name to your project on the top as shown below ( I named it 'SpringProject')
step 4)now give a base package name like this
and that is . The project will be created in a few minutes and Now you can right click on it and run on server.

- 1,915
- 3
- 19
- 37
- step 1: create a new "Dynamic Web Project" in eclipse.
- step 2: right click on the created project.
- step 3: click on "configure" option.
- step 4: click on "convert to maven project".
here is more detailed information -> [1]: https://crunchify.com/simplest-spring-mvc-hello-world-example-tutorial-spring-model-view-controller-tips/

- 1