lishman levelup
«previous  next»

Getting Started
Form Processing
IoC Container
Hibernate ORM

The Spring MVC Demo Application

The application displays details of a country, which has been selected from a list.

Hello World Application in English


The screens will be displayed in different languages, depending on the user's locale.

Hello World Application in French

The World Service

The application will make use of the WorldService business service facade and the Country domain object:
public interface WorldService {

  public Collection<Country> getAllCountries();

  public Country getCountryById(int countryId);

  public Country getCountryByName(String countryName);

  public void saveCountry(Country country);

  public void deleteCountry(Country country);

public class Country {

  private Integer id;
  private String name;
  private Integer area;
  private Long population;
  private Date populationLastUpdated;
  private String currency;

  public boolean isNew() {
    return id==null;

  public void setId(Integer id) { = id;

  public Integer getId() {
    return id;

  public void setName(String name) { = name;

  public String getName() {
    return name;


For now, we will use a mock WorldService implementation, but later we see how to access country data from a database, using Hibernate.

Tip - the tutorial contains code snippets to highlight only the relevant pieces of code. Use the Quick Start page at the end of each section to see all the Java and JSP code in full.