CSCI 4230.1
Internet Application Development
Fall 2001
Final Examination

Name:  _________________________________     Total score: 100%.

Time allowed: one hour and 30 minutes. Answer all questions.  Plan your time well.

Open: text book, lecture notes, every file I posted in my Web page, your project assignments, and CNet's and WebReview's CSS references.

Turn in both questions and answer sheets.  Put the question paper on top for stapling.  Be sure to write your name in every answer paper. Write your code to produce the output screens as close as possible.

Academic honesty policy will be strictly enforced.  Cheating will result in a failing grade (D or below) and a permanent academic record.

(1)    [20%]    Write a simple ASP program t2q1.asp to display the sum of all integer values of the HTTP parameter "num".  For example, if the URL is:

http://dcm.uhcl.edu/.../t2q1.asp?num=1&num=2&num=3

the output page in the browser is:

This is because the three values of "num" are 1, 2 and 3, and they sum up to 6.  Your program does not need to handle errors in the format of "num".  If num does not exists, such as:

http://dcm.uhcl.edu/.../t2q1.asp

then the output page should be:

(2)    [15%]   Consider the following HTML file: q2.html. The content of the style element is missing:

<HTML>
<HEAD>
<!-- Define your style inside the style element.  -->
<STYLE type="text/css">
<!--
-->
</STYLE>
</HEAD>
<BODY>
<H2 CLASS="box">Section A: with a dashed box</H2>
<H2>Section B: no box</H2>
<H4 CLASS="box">Section C: no box</H4>
</BODY>
</HTML>

The html file is displayed in IE 5.x as:

Study the source code and the browser display carefully and give a definition of the contents of the style element to produce the output display as close as possible.

(3)    [20%] Write a simple Java Servlet Fall2001.t2aq3 to accept a http parameter 'inStr' and return the length of the string.  Initially, the servlet displays a form:

When the string "abcdefgh" is submitted, the servlet then displays:

(4)    [45%] Consider the table t2q4(FacultyId, FacultyLastName, FacultyFirstName, FacultyEMail).  An instance of the table may be:
 
FacultyId  FacultyLastName  FacultyFirstName  FacultyEMail
1 Yue Kwok Bun yue@cl.uh.edu
2 Perkins Sharon perkins@cl.uh.edu
3 Collins George collins@cl.uh.edu
4 Giarratano Joseph giarratano@cl.uh.edu

Write an ASP program to allow the user to edit the faculty email.  For the table instance above, the page initially displays exactly:

The user may then edit the email of any faculty member.  For example, he may change "giarratano@cl.uh.edu" to "joe@cl.uh.edu":

If he then clicks on the "Update Email" button for Joseph Giarratano, the new email should be submitted to the URL processUpdate.asp with the faculty ID (4 for Giarratano) and the new email address value.  The submitted URL including the query string should be:

.../processUpdate.asp?FacultyId=4&Email=joe@cl.uh.edu

Note that you do not need to write the program processUpdate.asp.