-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating

Spring MVC Beginner's Guide
By :

Let's create our first spring MVC project in STS:
Maven project's template selection
com.packt
, Artifact Id as webstore
. Then, select Packaging as war
and click on the Finish button, as shown in the following screenshot:We just created the basic project structure. Any Java project follows a certain directory structure to organize its source code and static resources. Instead of manually creating the whole directory hierarchy by ourselves, we just handed over that job to STS. By collecting some basic information about our project, such as Group Id, Artifact Id, and the Packaging style from us, it is clear that STS is smart enough to create the whole project directory structure with the help of the Maven plugin. Actually, what is happening behind the screen is that STS is internally using Maven to create the project structure.
We want our project to be deployable in any servlet container-based web server, such as Tomcat, and that's why we selected the Packaging style as war
. After executing step 4, you will see the project structure in Package Explorer, as shown in the following screenshot:
The project structure of the application
As we are going to use Spring MVC APIs heavily in our project, we need the Spring jars in our project during the development. As I already mentioned, Maven will take care of managing dependencies and packaging the project.
Change the font size
Change margin width
Change background colour