CPSCI 105: Explorations in Computer Science

Lab 16

April 10, 2007

Preliminaries

  1. Log in to your account on warp and make public_html your working directory.
  2. Create a directory named forms in the working directory. Set its protections so that the web server can access it.
  3. Make forms your working directory.
  4. Use the following command to copy two files from the directory /home/public/web-authoring to your working directory:
    cp /home/public/web-authoring/form* .
    (Don't forget the dot—it's part of the bash command—it's not a period.)
  5. Set the protections on your form* files so that they're readable over the web.
  6. Open your warp homepage in your favorite browser; modify the URL in the address bar to open the file the file form-test.html that's now in your forms directory.
  7. If the page doesn't display in your browser, check the following: Is the URL correct? Is everything in the URL spelled correctly? Are the permissions set correctly on the forms directory? Are the permissions set correctly on the form* files?
  8. Enter the requested information and click on the appropriate button to submit the form for processing. The browser should load a web page displaying a table of what it could read from your form. If it doesn't, call me over and we'll figure out what the problem is.
  9. Go back to the webpage containing the form and clear it, using the button at the bottom of the page. Submit the empty form. Note any differences in the table displayed in response to your form.

Duckett's examples

We'll do this part together. It is extremely important that you follow these instructions exactly.

  1. Do a pwd to make sure that your forms directory is the working directory. If it's not, make it so.
  2. The examples from your textbook are currently mounted on our web server. We're going to create a shortcut to them so that they'll appear to be located in a subdirectory of your forms directory. (That way, you'll be able to access them easily for editing and testing purposes.)
  3. Issue the following bash command:
    ln -s  /var/www/html/duckett/ch06_code/  duckett
  4. Remember that although the examples appear to be in your filespace, you don't own them. You can modify them in emacs, but to save your work, you'll have to do a "save as" into your forms directory. (Note: if they open into a "read only" buffer in emacs, you can edit the buffer by giving the command C-x % .)

Forms

The primary purpose of the form-test.html file is to give you the URL of the CGI program that we'll be using to process the forms we'll be making in class.

Today we'll discuss:


[ Return to the CPSCI 105-01 homepage ]

Brian J. Rosmaita <contact me>
This page was last modified Tuesday, 10 April 2007 at 16:55 UTC.
Valid XHTML 1.0 ! Valid Cascading Style Sheets! This page is in AAA Conformance with the Web Content Accessibility Guidelines