CSC309 Assignment #2
(due November 15th in tutorial)


Re-implement the requirements for assignment #1 using specific server-side technologies. You must re-implement all of the requirements, including browse and search, shopping cart, and order processing. You will continue to maintain poster information only in an XML file (no hard-coding of poster information anywhere else in the Web site). You may re-use the same XML application you used for assignment 1, or design a better one. No marks will be allocated for the XML or the DTD this time around.

Maintain the shopping cart on the server. Allocate a unique session id for each new poster shopping session. Use cookies to track the session id. Use the session id to keep track of the shopping cart contents in a file (one file per session is ok, but not necessary). Be sure to remove associated information from the system after the session is closed. Implement a policy for expiring abandoned sessions.

Write a server program that reads the poster xml information into memory on startup. Anytime you require poster-specific information, your server-side programs will query this server. you must design your own ASCII protocol for doing this. Use the following technologies for the site:

There is some starter code that shows you how to invoke a PERL cgi-bin program from an html file, and how to make queries and process responses from a server program written in Java. It is located in the student's guide reachable from the course Web page. Note especially how the Java server is given as an argument your personally-assigned web server port number. It increments it by 1000 (as you should do for your assignment) and uses that port number for communications.

Hand in:

As well, your site must correctly function. Using the CDF submit command (submit -N a2 csc309h <files>), submit (all in one directory) all the necessary files. Include a Makefile for building your Java server program, and a README file for any special information. The TAs will, on their own Apache setup, install your cgi-bin programs into their cgi-bin directory, install your html into their root html directory. They will then start Apache using their own port number. Next, they will build and run your server as follows:

    make
    java Server <their-port>
Next, they will fire-up Mozilla 1.1 on their Apache server on the URL
    http://localhost:<their-port>/index.html
Good Luck!