It helps to visualize templating basics in terms of Java's layout mechanism. To design GUI applications, Java provides the concept of layout managers, components, and containers.
Components get placed on containers, while the layout manager decides how to lay out the containers. Furthermore, containers themselves can be regarded as components for other containers, thus providing for nesting behavior. In simple terms, a template for a Web application is a simple JSP file and is the equivalent of a layout manager. A template hides how the layout of a Web page is done. In other words, it hides the algorithm for the layout. If the algorithm needs to change, the change is restricted to the template. The Web pages implementing this template simply update themselves to reflect this change.
If templates are the equivalent of layout managers, what are the corresponding comparisons for containers and components? Components are the actual content files: the JSP, the HTML, the images, etc. Containers collect these visible components into one unit. A container itself will be a JSP file. A container needs to know what template to use to render the components that it contains. To use a Java GUI, Web example, a panel (container, collecting unit) can contain buttons and textfields (components, content) and have a GridLayout (layout manager, template) telling it how to lay out these components.
I have never used Struts, but would like to understand what value they offer. Do you use Struts? Is so, what is your experience of them? How do they help? How do they get in the way? Also, is "Struts" singular or plural?