Problem 1
Fill in the blanks in each of the following statements: a. The two most common HTTP request types are ___ and ___. b. Browsers often \(\quad\) Web pages for quick reloading. c. In a three-tier application, a Web server is typically part of the ___ tier. d. In the URL http://www. deitel.com/books/downloads.html. www. deitel.com is the ___ of the server, where a client can find the desired resource. e. \(A(n) \quad\) document is a text file containing markings that describe to a Web browser how to display and format the information in the document. f. The environment variable \(\quad\) provides a mechanism for supplying data to CGI scripts. g. \(A\) common way of reading input from the user is to implement the XHTML \(\quad\) element.
Problem 2
State whether each of the following is true or false. If false, explain why. a. Web servers and clients communicate with each other through the platform- independent HTTP. b. Web servers often cache Web pages for reloading. c. The information tier implements business logic to control the type of information that is presented to a particular client. d. A dynamic Web page is a Web page that is not created programmatically. e. We put data into a query string using a format that consists of a series of name-value pairs joined with exclamation points ( 1 ). f. Using a CGl script is more efficient than using an XHTML document. g. The post method of submitting form data is preferable to get when sending personal information to the Web server.
Problem 3
Define the following terms: a. HTTP. b. Multitier application. c. Request method.
Problem 4
Explain the difference between the get request type and the post request type. When is it ideal to use the post request type?
Problem 5
Write a CGl script that prints the squares of the integers from 1 to 10 on separate lines.
Problem 6
Write a CGI script that receives as input three numbers from the client and displays a statement indicating whether the three numbers could represent an equilateral triangle (all three sides are the same length), an isosceles triangle (two sides are the same length) or a right triangle (the square of one side is equal to the sum of the squares of the other two sides).
Problem 7
Write a soothsayer script that allows the user to submit a question. When the question is submitted, the script should choose a random response from a list of answers (such as "It could be", "Probably not", "Definitely", "Not looking too good" and "Yes" ) and display the answer to the client.