HW#2 --- last modified March 02 2019 17:04:59..
Solution set.
Due date: Oct 1 (extended to Oct 2. People who submitted for Oct. 1 receive one bonus point
after curving.)
Files to be submitted:
certificate.dtd
exercise76.zip
exercise811.pdf
Purpose:
To experiment writing an XML DTD; to gain practice with JSP, JDBC, SQLJ;
to understand the difference betweeen various kinds of indexes and
stroage techniques.
Specification:
For this assignment you need to turn in three files.
In the first file,
certficate.dtd, you should turn in a DTD that would be able to store
the information contained in decrypted SSL certificates. SSL is one method
for
securely trasmitting HTML form data. (Do a google search on mod_ssl for
more information and for what is stored in SSL certificates.) The idea
is that we are pretending we will store such certificates in a database
in an XML format, so we need a DTD (since we don't know XML Schemas) to
specify the format. Be sure to document your DTD (format of comments is
slightly flexible as there are no department quidelines for commetning
web documents). This counts as part of
commenting code point below. Your DTD should make use of XML elements,
attribute lists and entities in a non-trivial way.
The second file should contain the source code (you do not need to turn in
class files or executables) necessary to do a variation on
Exercise 7.6 out of the book. First, your ZIP file should contain
a README file saying what the grader needs to do to compile and deploy
your code. Be aware that connecting to Oracle might involve different
passwords and connection strings than for you. For the Infrastructure part
of this exercise, I want you to write both an Embedded SQL and SQLJ
program (call them create.pc and create.sqlj or something like this) that
creates the table and inserts the rows in the format
specified. You should also write programs (drop.pc and drop.sqlj) that
will delete all rows and drop the table. You do not need to do the
placeholder technique part of the exercise. For the query constraint part
of the exercise I want you to use a JSP (query.jsp) that connects to the
database and your table using JDBC. Before displaying any search results
you should display a form that sends data using GET to get the connect
string and login and password for the oracle account. Your JSP uses this
information to connect to the correct database and table. The <%@ page
import="package" %> directive can be used
to load packages in a JSP. Also, you should be aware that Oracle 9i often
comes with Apache and JServ. So if you connect to localhost
you might be already running a web-server that can be used for development
purposes. To find the root directory of the web-server, look under you
Oracle installation directory then look for the Apache folder and then
htdocs.
The last file should contain your solution to exercise 8.11 out of the
book.
Point Breakdown
Departmental coding guidelines for Java followed and
documentation for each file (including README file) submitted |
1pt
|
certificate.dtd would work to store SSL certificates in a
reasonable manner adn does make use of XML elements,
attribute lists and entities in a non-trivial way (1pt each). |
3pts
|
create.pc, create.sqlj, drop.pc, drop.sqlj work (1/2 pt
each) | 2pts
|
query.jsp works (2pts JDBC part) (1pt rest) | 3pts
|
Exercise 8.11 | 1pt
|
Total | 10pts |
|