In this version, you add a second SQL table—one for a user database. I've provided code for you for yet another version of the Beer Advisor—this one with usernames and passwords.
In the last assignment (H08), I indicated that there were a few things we were doing wrong. We've fixed one of those here, and left another unfixed, as a choice point opportunity.
web.xml
) to set the JDBC URL, username, and password, instead of hard coding those inside the controller servlet. In this assignment, the code illustrates the correct technique—all those parameters are set in the web.xml file. This means that they can be changed without having to recompile the code. In a real world setting, that is pretty helpful.In this assignment, you will:
There are also two choice point opportunities here:
The following reading is recommended:
You can obtain the source either as:
You may also browse the source in the H09 directory.
Download this to your development directory. You can do this directly on porsche in the same way that you did it for H07 (see H07 for details).
Before you deploy it, follow the steps to add the BA_Users table to your own database, just as you did in H08
Now, create your own app, using the same product you used in H05,H06,H07 and H08.
You'll create a static HTML page http://copland.udel.edu/~jstudent/cisc474/H09 that contains
Here is some advice from the wiki on creating a tarball and creating a zip file
Be sure that the link you created in Step 4 works properly for downloading your source distribution.
Be sure when you go into WebCT, that you both upload and submit.
(The reason to have you also submit on WebCT as well as putting the code on the web is that submitting on WebCT (a) creates a permanent archive, (b) establishes a submission time, and (c) enables the TA to give you a grade.)
Item | Description | Points |
---|---|---|
Operational Application | The application does what it is supposed to do. (It is ok if password recovery is not implemented, unless you went for the 100 choice points, in which case, it should work!) | 30 |
SQL | You have an sql directory with an SQL file to create and populate both your product and user databases. | 10 |
Java code | Your Java code works and is well commented and structured | 40 |
JSPs | Your JSPs are well commented and well structured | 40 |
Javadoc | Your code has proper javadoc (i.e. not the Javadoc that was in my code, still unmodified!) |
10 |
Ant | Your build.xml file looks reasonable | 10 |
JUnit | You have reasonable JUnit tests, and they are updated to reflect the database version of the Servlet (just like the BeerAdvisorDB example illustrates) | 10 |
WAR file | You used a WAR file | 10 |
Scripting and Submitted | You followed instructions for scripting and submitting | 10 |
Reasonable package names | No example.com type package names | 10 |
tarball or zip file of source distribution works properly |
Top level directory is correct, you can unpack and do Ant, and get a menu. global.properties need to be changed only for classpath, and for deployment reasons. | 10 |
HTML validates as HTML 4.0.1 strict, XHTML 1.0 strict, or XHTML 1.1 | You should have a validation icon on your index.html, and your "result" HTML should validate when you copy and paste the view source of the resulting HTML (not the JSP source) into the "validate by direct input" box at http://validator.w3.org (the third one down). | 10 |
TOTAL POINTS |