\n"); } else { header("Content-type: text/html; charset=utf-8"); } ?> CS-081 Assignment 1

Overview

The purposes of this assignment are to familiarize you with the use of the laboratory facilities for the course and to establish standard procedures for developing web projects for the course.

Procedure

  1. Log into your account and verify that it is working correctly.

    Log into any one of the computers in A-205 or A-227 using your account name for this course, which consists of the first letter of your first name, your last name, and the digits “081” all as a single lower-case string. That is, if your name is "Always A. Good Student", your account name is astudent081. Use the password given to you in class, and remember that you will be required to change it to something secure the first time you log in.

    The names of the computers are:

    A-205A-227
    birchapple
    cherryfir
    chestnutjuniper
    elmmimosa
    ginkgopeach
    hemlockpine
    hickoryplum
     spruce
     sycamore
     walnut

    Room 205 is an “open lab,” which means you can use them any time you want. The secretaries in the CS Department Office (A-202) will open the lab for you if it is closed. Room 227 is a closed lab, so you will not be able to sit at the computers in that room to use them. However, all of the computers are accessible from the Internet. If you have access to a computer running Windows XP with a broadband connection, you can use Remote Desktop to log in. From the Start button, go to Programs, to Accessories, to Communications, and you will find it. When it asks you what computer you want to connect to, pick one of the names above and add the domain name “.cs.qc.edu” to the computer name. For example, you would log into ginkgo by entering ginkgo.cs.qc.edu.

    When you use Remote Desktop, select one of the computers in A-227 so that students who are on campus will be able to use the computers in A-205. The exception to this rule is from 5:00 to 6:15pm on Tuesdays and Thursdays, when there is a class using room A-227.

    Use Windows Explorer to verify that your “My Documents” directory contains a directory named “My Web Pages.” That directory should already contain a file named template.xhtml, which you will be using as a starting point for the web pages you write for this course.

    Make a copy of template.xhtml named index.xhtml in the same directory.

    Log off the computer you used and log into another one.

    On the second computer, verify that your index.xhtml file shows up in your My Web Pages directory, indicating that your “profile” (settings) were successfully copied to the domain server (maple) when you logged off the first computer and that they were then copied to the second computer when you logged into it. If you have any problems with this step, contact Dr. Vickery for help before proceeding with the remainder of the assignment.

  2. Edit index.xhtml and test it.

    Use any text editor to change the title and h1 elements of your index.xhtml file from the word “Template” to your own name. It would be best to use a programming editor such as Vim, or even the full web IDE, Dreamweaver. However, it is possible to make the change using Notepad, but you have to put quotation marks around the file name when you save it or Notepad will change the name to a index.xhtml.txt, and the web server won’t be able to display it properly because of the wrong extension.

    Here are links to some introductory material on the programming editors available to you in this course:

    There are four ways you can try to view your new index.xhtml web page in a browser, but only three of them will work!

    1. (This is the technique that does not work!) Click on the file using Windows Explorer. Windows recognizes that .xhtml files are web pages and tells the default browser to show the page. But our template file includes some server-side scripting code written in PHP, and its presence will confuse the browser, which will display a cryptic error message.
    2. Start Firefox, and type the URL “localhost/~astudent081” into the location bar, substituting your own account name for astudent081.
    3. This technique is the same as the previous one, but substitute the name of the computer you are using for the word “localhost” in the URL.
    4. This technique is the same as the previous one, but enter the Fully Qualified Domain Name (FQDN) for the name of the computer you are using. The proper FQDN for the computers in the lab is the name of the computer name followed by “.cs.qc.cuny.edu” (ginkgo.cs.qc.cuny.edu, for example), but you can safely leave out the “.cuny” part if you want to.

    Note that only the last technique will work for accessing your web page from another computer, and even that technique will only work while you are logged into the computer whose FQDN you use.

    Now copy (don’t move) your web page from your “My Web Pages” directory to C:\htdocs and verify that you can view it by specifying just the computer name in the address bar.

Submit the Assignment

When you have completed the assignment, send me an email message that says “CS-081 Assignment 1” in the subject line and that contains your real name and account name in the message body. I will get a copy of your work from maple to look at.