Design and Implementation

Overview | Servlets | JSPs | Model Classes | Database

Overview

This logic web application consists of an HTML (Hypertext Markup Language) interface that communicates with servlets and JSPs (JavaServer Pages) that communicate with backend code written in Java and a PostgreSQL database. (See Fig.1)

We use Andre Platzer's Orbital Library to handle the logic for the symbolic logic expressions.

Fig.1

Fig.1

Java Servlets

A web.xml file organizes the way the application is deployed. It maps the servlets to URLs and allows the servlets to be configured through init parameters that we specify.

Users can access the HTML forms through their browsers. The information that they enter through the forms are submitted through a HTTP request to the web application server. The get method returns a response in HTML back to the users browser.

JavaServer Pages (JSPs)

JSPs help to merge HTML and Java and separates the static HTML from the dynamic. The web application server compiles JSPs into servlet code in a very clean and efficient way.The communication between JSPs and servlets means that the servlet handles most of the work so it is removed from the HTML.

Model Classes

The model classes model the components of the application, such as Quizzes, Questions, and Answers. Checking for valid syntax of answers and that two answers match is implemented using the Orbital library.

Database

The database is a PostgreSQL database.