One of the large benefits of generated HTML, is that the principles of Object Oriented programming can be applied to extract the common elements from a collection of pages. The code to generate the common elements needs to only be written once and reused or specialized by all the pages.Generation of a WWW sites Look and Feel is a prime example of a common element which can be encapsulated in a single class. This sites look and feel has been generated from the class com.mortbay.Jetty.JettyLaF which is a specialization of com.mortbay.HTML.Page. This particular Page derivation supports two styles of look and feel, which can be simply switched for the entire site:
The servlet used in the HTML generation demonstration can be updated to use the default look and feel with a one line change. Click here to see a the generated HTML demo in this sites default look and feel. The source that generated that HTML is included below.