CSC 513 Programming Assignment #1

This assignment helps you become familiar with basic technologies for developing web applications. It involves a relational database, JSP, Servlet, SQL, and JDBC. Along the way, you will learn how to set up an environment including Tomcat and Apache Ant.

You will need the template files: hw1template.zip. Follow the README for instructions.

Description:

You are to build a small web transaction application for a local store, VirtualMedia. This store provides users with three categories of products: TVs, DVD players, and VCRs. For simplicity, we don't distinguish among different products in the same category -- that is, all TVs appear the same. Key information about products should be maintained, including types, current inventory, and prices. Consider only one kind of potential users for the web application you develop, namely, customers. You should keep information about users, such as their names, addresses, and passwords (for simplicity, as clear text). Your solution should provide the following functionality:

  1. Register users by hand by executing an appropriate SQL statement.
  2. Present an opening web page through which users can login. Once users input their user names and passwords via the interface, check whether these users are registered. If the user has not registered, deny the login. For registered users, determine their category (customer or vendor). For vendors, simply say "not supported".
  3. For customers, present a screen through which they can search for products.
  4. For products that are available in the inventory, enable customers to order them by inputting desired quantity. Verify that you have enough quantity available in your inventory, and reject orders that cannot be fulfilled. Otherwise, update the inventory and record the transaction.

Follow these steps to complete this exercise:

  1. Design all necessary logical (relational) schemas for the database. And create tables according to these schemas in the course Oracle server, and populate these tables with initial tuples. The TA will supply sample SQL statements to create tables, populate tables, and perform queries.
  2. Test the SQL statements from a terminal interface. For Oracle, look at the SQL*Plus directions.
  3. Design the necessary web and JSP pages and determine the calling structure between the web and JSP pages. The TA will supply fairly detailed examples.
  4. Set up your web application file directory structure. The TA will supply a sample.
  5. Build your application, deploy, and test.

Include a README file outlining any assumptions and decisions you make when doing this exercise. Include the instructions to invoke and test your program, especially the login ID for a customer and sample products and quantities with which you tested your application. Submit each file you create or change in a zip file to wolfware. If you are using the template provided, please do NOT include the classes12.jar file in your submission.


Course page | TA's page | JSP | Servlet | Apache Ant | Apache Jakarta Tomcat | FAQ | Contact TA