The Web Graph Database


Term: StructuredResponseTemplateFactory

Part of InfoGrid Html Templates, StructuredResponseTemplateFactory determines which StructuredResponseTemplate should be used for an incoming HTTP request.

The default implementation, DefaultStructuredResponseTemplateFactory uses the following algorithm:

  • the desired output MIME type is determined
  • the application context is determined
  • if a named template is required, that named template is used; otherwise a default template is used based on application context
  • the template's name determines where to look for the JSP that is used as the template.

By default, template JSP files are found in relative directory /s/templates/, such as /s/templates/default for the template with name default. Below this directory, directories representing the MIME type need to be defined. For MIME type text/html, for example, this leads to directory /s/templates/default/text/html. In that directory, file template.jsp defines the actual template.

If MIME type text/json had been requested for the template with name compact, this would lead to JSP file /s/templates/compact/text/json/template.jsp.

See also:

Last modified 6 years ago Last modified on 07/21/09 18:08:07