More Projects
PROJECT 5: SERVLET SESSIONS

Our site is getting more interesting now. In this project, you are going to add to the previous projects a Shopping Cart using Java Servlet Sessions. When in doubt, check out an online book store for an idea.

1. Add to your Movie tables in your servlet a new column titled "Add to Cart". The new field has a hyperlink titled "Add to Cart" and a field for entering the quantity of purchase. Also add to all pages that contain movie tables two links "View Cart" and "Proceed to Check out".

2. For a registered customer (see last project),

  • if the customer clicks on "Add to Cart" or "View Cart", then display a "Current Shopping Cart" page with the customer's current shopping cart items, including pricing and quantity. On the same page, provide the customer with these options:
    • "Continue browsing" which will lead the customer to the previous display, or
    • "Proceed to Checkout" which will lead the customer to a payment center. You can design the payment center any way you like, as long as you give the customer a way to return and exit.
    • The customer should be able to modify the current shopping cart clicks on an "Update" button to update the cart.
  • if the customer clicks the "Proceed to Check Out" link, the page should display the following information:
    • A warm greetings message with the customer's name
    • each item in cart with item information and quantity,
    • tax calculations in BC,
    • Total payment due

On the same page, the customer can choose to cancel the order altogether, browse more, or pay through some pseudo payment method. If the customer chooses to pay, a "Thank you" message will be printed on a message page, and information about the order, including the real time of the order, should be saved in a log file.

For testing purposes:

  • Please name the log file "shoppingcartlog.txt"in order for the instructor and TA to check for correctness. Please also add a link to the file from the project table page.

The log file is important for your later projects. For example, you can use data mining later to find out the customer's true preferences and how it changes through time!

3. For an unregistered customer, if he/she clicks"View Cart", "Add to Cart" or "Proceed to Check out" links, a registration page should appear.

4. All other workflow choices can be decided by yourself. However, please make sure that you include clear documentation in this project. Documentation will be part of the mark.

5. Hand in: Please include in your project table

  • the link to the store front
  • a link to your log file
  • a link to your java file stored in an HTML file
  • a link to your documentation file also in HTML (you can use javadoc for this).
More Projects