Lab: 11


Objective

To revisit Lab 10 and investigate possible options of implementing a jsp application using JavaBeans as per the MVC architecture.

(Note that JavaBeans should be used to store the data that is to be presented. The application logic should be managed by the servlet receiving the request and forwarding it to the relevant .jsp page as recommended by the MVC architecture.)

Functional Requirements

  1. The web application will return two types of statistics to the user (depending on the request made) .
    The user requests for:
    1. The list of all countries in a continent (as specified) along with their population, area and population density details.
    2. The list of the languages spoken in the top ten countries with the largest population.
  2. The user shall provide
    1. The name of the continent and
    2. The type of data required (as specified in bullet 1).
  3. The web application must provide separate implementations of .jsp pages for the data requested.

Methodology

  1. You are required to implement three components
    1. Servlets
      1. To receive the request as forwarded by the container.
      2. To determine what application logic to execute.
      3. To instantiate and populate JavaBeans.
    2. JavaBeans
      1. To store data compiled (as per the user request/) after the execution of the application logic.
    3. JSP pages
      1. To manage the dynamic presentation of content as provided by the instances of JavaBeans created and populated by the servlets.

Instructions for submitting your work

  1. You are required to demonstrate your implementation during the lab.
  2. Create an archive (.zip) of your project folder and submit it online.

Last updated: 3rd December, 2007