

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
A project for computer science students to implement an http 1.0 deamon that serves static web pages, pages with dynamic content using ajax, and dynamic server pages. The tasks include creating new source code files, testing implementations, and studying ajax programming with xml.
Typology: Study Guides, Projects, Research
1 / 3
This page cannot be seen from the preview
Don't miss anything!


Your task is to implement an HTTP 1.0 deamon that serves static Web pages, pages with dynamic content using Ajax, and dynamic server pages.
To get started:
The Web server always returns ’Hello, World!’ regardless of the HTTP method (GET/POST) and URL path. This is too simplistic to be useful. Your tasks are to:
’http://127.0.0.1:1nnnn/test?course=IC’ has a path ’test’ and a query string with one key- value pair ’course=IC’. The pairs are separated with a ampersand (&) and the strings are URL-encoded. For sake of simplicity we restrict them to be ASCII letters and digits only.
Age:
. Modify hint.js to get the xmlHttp.responseXML with XML returned by your server and use the DOM to extract the name and age (when present) and to set the ’txtHint’ and ’txtAge’ values using the document DOM. It is up to you how to structure the XML content with the name and age info (remember that you must have one root element and that the HTTP content-type is now text/xml). The putajax() function returns the XML content with the name and only includes the age if the query string matches the entire name. That is, when the query value is ’agnes’ the age is returned with the name (assuming that ”Agnes” is in the name list).