Computer Networks

Tutorial #22

  1. The following markup appears in the context of a form on a Web page. How would you expect it to appear on a Web page?
        <INPUT TYPE="TEXT"  NAME="Name" MAXLENGTH="64" SIZE="20">
        
  2. What is meant by the following user interface terms:

  3. The following string of text has been urlencoded. What would the original form have looked like? Artist's impression required!
        name=Phil+Scott&sex=male&occupation=Ace+Lecturer
        
  4. The GET method is recommended for submission of form data if the submission of the form does not have side effects. What does this mean? What is the alternative?

  5. The following URL is typical of those observed in queries to the AltaVista search engine[1].

    http://altavista.yellowpages.com.au/cgi-bin/query?locale=au&q=%22phil+scott%22+bendigo&search=Search

    1. Does this URL suggest that the <FORM METHOD=> used to generate it was specified as GET or POST?
    2. What is the name of the CGI program which is executed by the Web server?
    3. Give, in plain text, the query string which was used to generate this URL.
    4. Practical exercise: although this URL has been (slightly) edited, it still generates a valid AltaVista search. Copy it from this Web page, and paste it into an "Open Page" dialog in your Web browser. What does it return?

  6. How does a CGI program written for a GET method obtain data from a form?

  7. (Advanced material) When an HTML <FORM> is specified to use METHOD=POST, explain how the browser sends the form information (or QUERY_STRING) to the Web server. How does the CGI program access the information in this case?

  8. (Non-essential material) Why are applets needed to achieve interactivity on Web pages? Can't you achieve the same thing using forms and CGIs on the server?

  9. (Non-essential material) Why does Java compile to bytecode instead of to real binaries for a (for example) PC - ie, a .exe file? At least two answers required here!

Practical exercises:


[1] I've given you the URL of the Australian AltaVista mirror here -- it's (usually) faster than the USA site, it has an upfront option to search Australian sites only, and the per-byte charge to the university is slightly less for data supplied from within Australia.
[Previous Tutorial] [Tutorial Index] [Next Tutorial] [Suggested Solutions]
Phil Scott