edu.northwestern.at.utils.servlets

## Class HtmlTemplate

- java.lang.Object
- - edu.northwestern.at.utils.servlets.HtmlTemplate

-     public class HtmlTemplate
      extends java.lang.Object

  A simple HTML template manager for servlets.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected TextFile` | `template` Text of template.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `HtmlTemplate(java.lang.String templateFileName, java.lang.String encoding)` Create HtmlTemplate with specified template file name.
    `HtmlTemplate(java.net.URL templateURL, java.lang.String encoding)` Create HtmlTemplate with specified template URL.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `outputTemplate(java.io.PrintWriter writer, UTF8Properties templateProperties)` Substitute values in template.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### template

          protected TextFile template

      Text of template.

  - ### Constructor Detail

    - #### HtmlTemplate

          public HtmlTemplate(java.lang.String templateFileName,
                      java.lang.String encoding)

      Create HtmlTemplate with specified template file name.
      Parameters:
        `templateFileName` - HTML template file name.
        `encoding` - Character encoding for template.

    - #### HtmlTemplate

          public HtmlTemplate(java.net.URL templateURL,
                      java.lang.String encoding)

      Create HtmlTemplate with specified template URL.
      Parameters:
        `templateURL` - HTML template URL.
        `encoding` - Character encoding for template.

  - ### Method Detail

    - #### outputTemplate

          public void outputTemplate(java.io.PrintWriter writer,
                            UTF8Properties templateProperties)
                              throws java.io.IOException

      Substitute values in template.
      Parameters:
        `writer` - Output writer.
        `templateProperties` - Properties with values to substitute into template.
      Throws:
        `java.io.IOException` - If output cannot be written.