Assignment 1 - Basic JSP
Due: 2007-08-07, 10:00
The assignment shall be solved individually.
The purpose of this assignment is to give an introduction to JSP programming and
building web interfaces for three-layer architectures in Java/JSP.
In this assignment, you will create JSP web pages for presenting information
about user profiles in a system. The data will be retrieved via provided routines in
a (simulated) logic layer. Your task is to create web pages which presents this data to
an end user in an acceptable manner.
You are free to choose how this information is presented,
but a minimal functionality set required includes
- a page which lists the profiles available (use of paging is recommended)
- a page which shows detailed information about the profile
Laboration environment
Download assignment1.jar and place it in your web applications
library directory (5dv076/username/web/WEB-INF/lib ).
This JAR-file contains a small simulated logic layer for a three-layer web application
architecture. The system is provided in a Java package called assignment1
which contains the following classes:
assignment1.Id <- a UUID wrapper class
assignment1.Profile <- a profile representation
assignment1.ProfileAccessor <- an accessor interface for the profiles
assignment1.ProfileAccessorSimulator <- a simulated implementation of the accessor
assignment1.ProfileAccessorSimulator.Factory <- a factory class for the simulator
The profiles in this system contains four data fields: id, username, birthdate and email.
The Profile class contains get methods for each of them.
The accessor interface contains methods for querying the system for number of profiles, retrieving
a range of profiles and retrieving a specified profile.
To use the system you simply instantiate an accessor:
ProfileAccessor accessor = ProfileAccessorSimulator.Factory.getInstance();
and retrieve the data you are interested in:
int nrProfiles = accessor.getNrProfiles();
Profile[] profiles = accessor.getProfiles(offset,limit);
Profile profile = accessor.getProfile(id);
See the environment page for details on installing and using the
laboration environment.
Examination
Place a WAR-file containing your solution in
~/edu/5dv076/assignment1/
and email the teachers when you have completed the assignment.
Alternatively, you may email the WAR-file directly to the teachers.
The WAR-file will be named username.war and can be found in the directory
5dv076/username/dist/
Due date
2007-08-07, 10:00
|