img
Now we have our first view working. In the upcoming sections, we will enrich the application with
more views and enable support of i18n, themes, and so on.
Spring MVC Project Structure Overview
Before we dive into the implementation of the various aspects of a web application, let's take a look at
what the project structure in our sample web application developed in this chapter looks like.
Typically, in a web application, a lot of files are required to support various features. For example,
there are a lot of static resource files, such as style sheets, JavaScript files, images, component libraries,
and so on. Then there are files that support presenting the interface in various languages. And of course,
there are the view pages that will be parsed and rendered by the web container, as well as the layout and
definition files that will be used by templating framework (for example, Apache Tiles) for providing a
consistent look and feel of the application.
It's always a good practice to store files that serve different purposes in a well-structured folder
hierarchy to give you a clear picture of the various resources being used by the application and ease
ongoing maintenance work.
Figure 17-6 shows the folder structure of the sample web application that will be developed in this
chapter. The purpose of each folder (under the root folder /src/main/webapp) is listed in Table 17-3. Note
that the structure presented here is not mandatory but is commonly used in the developer community
for web application development.
In the upcoming sections, we will need various files (for example, CSS files, JavaScript files, images,
and so on) to support the implementation. The source code of the CSS and JavaScript will not be shown
here. So, we recommend you download a copy of the source code for this chapter and extract it to a
temporary folder so that you can copy the files required into the project directly.
Figure 17-6. Sample web project folder structure
Search WWH :
Custom Search
Previous Page
Spring Framework 3 Topic Index
Next Page
Spring Framework 3 Bookmarks
Home