Spring MVC Newbie Tutorial 1- Hello World

This document takes you through the basics of using NetBeans IDE to develop MVC web application. It demonstrates how to create a simple web application (uses model, view, controller design pattern), deploy it to a server, and view its presentation in a browser.

Requirement(s)

To follow this tutorial, you need the following software and resources.NetBeans IDE – Java or Web & Java EE installation (NetBeans 6.1, 6.5 or 6.7)Java Development Kit (JDK) – (JDK version 6 or version 5)GlassFish application server – (GF Version 2 or Version 3 Prelude)

How Spring MVC works

Basically the same way as Struts:

Based on the HTTP request URL, the DispatcherServlet calls the corresponding Controller.
A View is rendered and sent as HTTP response.

Spring Servlet Configuration

Let’s now create the Spring configuration file ‘WEB-INF/springmvc-servlet.xml’
(name based on the servlet name above):