Lab 3
CPE 437
Due 7/9/09
Overview
In this lab you’ll first fix the myriad errors in MusicStore, and then enhance the app in several ways.
0. Review MusicStore
Go through all the MusicStore pages, especially those we did not review in lecture, with their source code in an IDE, in parallel, so you understand how the code base works (or doesn’t work – see below).
1. Fix MusicStore
Murach’s QA process is pretty sloppy. Test music store, and fix:
a. The three broken links
b. The several bad misbehaviors of the shopping cart if more than one line item resides in it. Do not add any more “form” elements to deal with this. Instead, augment the button names with product codes so you know which button was pressed.
c. The fact that ordering a new copy does not increment the quantity in the shopping cart if that product is already in the cart
d. Hardwired use of the base directory “musicStore”, which must be done generally (See ServletContext.or c:url) This one fix is among the most tedious tasks of the quarter, and took me about an hour. As you do this, repeat the following to yourself: “I will never code like Murach, nor allow any member of my team to do so!”. It’s an excellent lesson in why it’s very unprofessional to hardwire configuration into your web app source code. When you’re done, you must not have the term “Lab3” in any html, jsp, or .java file.
f. any other bugs you can find. I’ll award points for any true bugs reported.
Fix each of these bugs.
2. Change MusicStore’s name to Lab3
If you did part 1d properly, this should go smoothly, requiring no changes to any jsp or html files, and only a minor change to an XML file or two.
3. Check it all
Check that:
□ the shopping cart updates and deletes the items associated with its buttons
□ these updates persist when you leave and return to the cart
□ nothing in the cart is hardwired to the specific set of products in the database – changing the Product table changes the cart
□ there is only one <form> tag in the shopping cart
□ clicking add-to-cart either adds a new line item, or increments an existing one, as appropriate.
□ “Lab3” appears in no .java, .jsp, or .html file in your code base, as verified by automated search
□ all broken links are fixed
□ all other bugs announced via Email (if any) are fixed
Affirm, by your signature below, that you carefully followed through on testing of each of the points checked above.
_____________________________________________________ _______
Name Date