The template is a JSP page, with place holders for the parts that need to change with each screen. Each of these place holders is referred to as a parameter of the template. For example, a simple template could include a title parameter for the top of the generated screen and a body parameter to refer to a JSP page for the custom content of the screen. The template for the Duke's Bookstore example, template.jsp , is shown below. The template is instantiated by the Dispatcher servlet.
Dispatcher first gets the requested screen and stores as an attribute of the request.
DefinitionTag , ScreenTag , and ParameterTag comprise a set of nested tag handlers that share public and private objects. DefinitionTag creates a public named object called definition that is used by InsertTag . In doStartTag , DefinitionTag creates a public object named screens that contains a hash table of screen definitions. A screen definition consists of a screen identifier and a set of parameters associated with the screen. In doEndTag , DefinitionTag creates a public object of class Definition , selects a screen definition from the screens object based on the URL passed in the request, and uses it to initialize the Definition object.