Electronic Postcard Application with Servlets and Sockets
Name
Short: Servlets and Sockets
Long: Electronic Postcard Application with Servlets and Sockets
Objective
The purpose of this lab is to implement a part of a distributed application
using servlets that execute on a web server and use sockets for inter-process
communication.
Time allocation
Four hours are allocated to complete this lab assignment.
Exercise
You will have to implement three servlets that:
-
Build a web page that presents the available cards as thumbnails. The information
about the available cards should be taken form the cards database. The
servlet should use sockets in order to connect to the CardDatabaseServer.
-
For a chosen card, construct a web page presenting the card and a text
area to fill in the message.
-
Given a message and a card, construct a web page as it will be seen by
the recipient. The servlet should connect to the CardWriteServer in order
to write the message on the chosen card.
-
Track the user's movements through the web site.
TO DO
-
Install the lab assignment.
-
Make sure the servletrunner is working properly by executing some of the
servlet examples.
-
Start by modifying the Client.java from the sockets
example.
-
Enable your servlets to track the user's session; display the session ID
on the web pages.
-
The resulted postcard should stay on the web server for two weeks; create
a unique file name for it.
Note: To pass this lab assignment you should generate all the three
pages. You do not need to do session tracking and the unique file name
in order to pass the lab.
Reporting your work
The lab is reported by showing the assistant the working application. All
members of the lab group should be present when reporting.
Appendices