[Q&A] (4pt) Please write down your answers to the following questions on a piece of paper, and show it to the instructor before you proceed to the Programming section.
Suppose we want to implement a custom tag <foobar> using a Java class Foobar.java. The tag will be used as <cs320:foobar foo="a" bar="b"/>, or in other words, with two attributes but no body content. We also assume that the home directory of your account on the CS server is $HOME. Please write down your answers to the following questions on a piece of paper, and show it to the instructor before you proceed to the next section.
1. Which Java package(s) should you import in Foobar.java?A. The URL to the location where the tag library can be downloaded.8. An attribute element in a TLD file has five possible attributes: name, required, rtexprvalue, type, and description. All these attributes are fairly self-explanatory except rtexprvalue, which could be either true or false. What does this attribute do?
B. The URL to the location where the TLD file can be downloaded.
C. A unique identifier for the tag library, and it can be any string, i.e. not necessarily URL-like.
D. A unique identifier for a tag in the tag library, and it can be any string, i.e. not necessarily URL-like.
[Programming] Please upload your files using the online turnin server. The files should include all the source code, documentation, and an HTML file lab2.html, which contains a link to your JSP page on the CS server. Note that file uploading will be disabled automatically after 1:20PM, so please turn in your work on time.
At the beginning of each CS320 class, I usually create a number of accounts on the CS server, and then assign the accounts to the students in the class. In this exercise, you are going to help me to automate this process.[SQL] (2pt) Create the following two tables, Accounts and Students, in your database, using proper attribute type for each attribute:
Accounts:
|
Students:
|
Note that the Accounts
table contains a list of accounts that can be assigned to the students,
and the Students
table contains a list of students who have enrolled
in the class. Initially the CIN
fields of the accounts are null,
which means the accounts have not been assigned yet. Also for
simplicity we'll
assume that CIN is simply a 4-digit number.
For this problem, turn in a file lab2.sql which includes the SQL statements to create and populate the tables.
[JSP] (4pt) Create a JSP page GetAccount.jsp. When GetAccount.jsp is requested without any parameter, it displays the the following form:Once
a user entered a CIN and clicked the Get
Account button, the application performs the following
operations: