Project 5 – Multi-Tier Web Application

 

Objectives

Gain experience building a multi-tiered web application.

Functional Requirements

Implement a web-based version of the chat system.  Replace the GUI with a web-based user interface.  You should design a simple web-based user interface that provides the same functionality as the GUI, and implement the application using a multi-tiered architecture consisting of Servlets, JSPs, Session EJBs, and Entity EJBs.  The EJBs from the previous project should be largely reusable in the web version, although some modifications will probably be necessary.  Most of the work will be in implementing the web-based client interface.

 

You are free to design your web-based user interface however you like, as long as it provides the same functionality as the GUI.  To give you an idea of what we’re looking for, an example web interface is shown below. 

 

Here is the application’s login screen:

 

 

 

Here is the main interface the user sees after successfully logging in.  Notice that this interface provides the same features as the GUI: select discussions, create and delete discussions, send comments, logout, etc.

 

 

 

It is important that users be required to log in before being able to access your web application.  Specifically, they should not be able to hack in without logging in by manually entering URLs in their browser’s address bar.  No matter how they reach your application, they must be required to log in before gaining access.

Implementation Requirements

You should use at least one Servlet in your application.  Here are some suggested uses for a Servlet:

1)      A filter that forces users to log in before accessing any page in the application

2)      A front controller for a Model-View-Controller architecture

 

You should use JSPs to implement your application’s web pages (don’t just use Servlets for everything).

 

All Java code required by your JSPs should be placed in Java Beans (i.e., regular Java classes) or custom tags, and should not be placed in the JSP itself.

 

The web tier (i.e., Servlets, JSPs, Java Beans, custom tags) should invoke the application logic tier (i.e., EJBs) to do the actual work of the application.  Just like the GUI that it replaces, the web tier should work through Session EJBs rather than going directly to the Entity EJBs or database.

 

Your web-based chat system should still require users to login using their Route-Y accounts.  In order to avoid sending clear-text passwords over the network, you should access your web application using HTTPS instead of HTTP.  HTTPS uses a different port than HTTP.  By default, HTTP uses port 8080 and HTTPS uses port 8181.  For example, use https://uml1.cs.byu.edu:8181/... instead of http://uml1.cs.byu.edu:8080/...

Project Submission

Create a gzip-compressed tar file containing all of your project's source files and directories. The name of the file must have the following format:

 

firstname_lastname.tgz
 

where firstname should be replaced with your first name and lastname should be replaced with your last name. For example, if your name is Bob White, you would use the following command to create your compressed tar file:

 

$ tar czf Bob_White.tgz project-dir

 

(this assumes that your project files are stored in a subdirectory named project-dir).

After you have created your tar file, click on the following link to go to the project submission web page:

Project 5 Submission Page

After you provide your CS account login name and password and the name of your tar file, this page will upload your tar file to our server.

After submitting your tar file, in order to receive credit you must also pass off your project with a TA. When you pass off, you will be asked to download your tar file from our server to ensure that you are passing off the same code that you turned in.  The project retrieval page is located at the following link:

Project 5 Retrieval Page