There are numerous template systems for use with servlets, including JSP. Although any template system can be used with apollo, the template system included with apollo has been highly enhanced for use with the apollo framework. The template system allows hyperlinking to nodes on the PageManager by simply typing the node's FQUID; and the session ID is automatically encoded onto the link. The template system renders pages by replacing names in the unrendered template page, with values from a replacement table passed into the template system. When running in HTML mode, the template system parses form elements, and updates them with the appropriate values. For example, if the unrendered template page looked like this:
---


Hello $$.userID., This form will be populated with data from our database
if it already exists.  Please make any changes and resubmit the form.
UserID: <input type=text name=userID><br>
Gender: <input type=radio name=gender value=male>Male <input type=radio name=gender value=female>Female

Reason for joining 
<textarea name=reason>
No Reason!
</textarea>
---

and a hashtable of the form:
{
'userID':'Joe',
'gender':'male',
'reason':'I had nothing to do at work, so I figured it would fill out this web form'
}
The rendered output would be:
---
Hello Joe, This form will be populated with data from our database
if it already exists.  Please make any changes and resubmit the form.
UserID: <input type=text name=userID value="Joe" ><br>
Gender: <input type=radio name=gender value=male checked >Male <input type=radio name=gender value=female>Female

Reason for joining 
<textarea name=reason>
I had nothing to do at work, so I figured it would fill out this web form
</textarea>
---
The html tags were parsed and updated with their appropriate values. The template system respects existing values, and will remove existing values only if a new one is supplied in the replacement table.

The HTML template engine can process textarea, text, hidden, password, radio, select and checkboxes.

The template system also has support for dynamically hiding parts of the page. This is done without any programming logic being placed in the unrendered page, still allowing for HTML editors to easily parse and manipulate the unrendered page.