CIT 597 Examples
Fall 2004, David Matuszek

HTML html-example.html This is just an example HTML page showing off most of the important stuff (not including frames). After you open this in your browser, be sure to do a View --> Source (or whatever the equivalent is in your browser) to see how everything is done.
HTML with CSS html-with-css.html Lots of strange examples. Uses an embedded style sheet, with just a few styles (for a colorful table) declared inline.
ShowURL ShowURL.java
ShowURL.html

Opening the ShowURL.html page in a browser (other than Firefox) runs the ShowURL.java applet, which just switches the browser to display another page (in this case, Google news). This code is from Art Gittleman, Advanced JavaTM: Internet Applications, pp. 65-66.

These forms of URL seem to work:
    "file://localhost/C:/Workspace/ShowURL/test.html"
    "http://www.google.com"

TryURL TryURL.java Application that takes a URL (hardwired in the example) and prints the contents of that page.
XML cit597.xml
cit597-with-dtd.xml
Here are two copies of an XML file describing something about this course. cit597-with-dtd.xml has an embedded DTD (right at the top), while cit597.xml has no DTD. In my browser, they both look the same.
XML with CSS cit597-with-css.xml
cit597.css
Here we have almost the same XML file--the only difference is the line <?xml-stylesheet href="cit597.css" type="text/css"?> to indicate that it uses the file cit597.css as a stylesheet.
JavaScript simple-javascript.html JavaScript for computing factorials.
JavaScript odds-and-evens.html JavaScript for playing the "odd-even" game.
Servlet with JSP Beer.zip The "Beer Selection" example servlet.