Home
Page Title ResolverPage Title Resolver
A page title resolver is used to convert the requested url, including query string, into a human readable title that has meaning.

For example, it is not uncommon to have urls like:
http://www.webmasterworld.com/forum10/3968.htm
Which has little meaning to a human being looking at a log file. However a title that has more meaning would be:
Forums : Webmaster General : Strange URLs

The page title resolver is used to provide the mapping between the url and a title.

A page title resolver is created by implementing the org.polliwog.resolvers.PageTitleResolver interface.

The implementation of the interface can perform whatever tasks is needed to generate the mapping.

polliwog only creates a single instance of the resolver that is then used for the entire log, the instance is intialized by calling the init(org.polliwog.data.VisitorEnvironment) method.

The title will only be resolved if a page title resolver is provided in the properties file for property:
pageTitleResolverClass

The resolved title is then set in the Hit class. The resolved title will also be transfered to the org.polliwog.data.HitPage class as well.
Basic Page Title Resolver
A basic implementation of the page title resolver is provided by the org.polliwog.resolvers.BasicPageTitleResolver class. This class uses a xml file to provide the mappings between urls and the page titles. It is a simple implementation and may to be used where there is a straight forward mapping between the two.

The format of the xml file is as follows:
Show the help for this table
NameRootChildrenParent(s)AttributesDescription
page-titlesYpage+NONENONEThe root element, each child page element defines a mapping between a url and a title.
pageNANYpage-titlesid(string,R),
name(string,R)
Defines a mapping between a url and a title. The id attribute defines the url, which should the path part of the url including the query string. The name attribute defines the title of the page.
The resolver uses property:
basicPageTitleResolverTitlesFile
to define the location of the xml file to use.

Example
<page-titles>
  <page id="/"
        name="Front Page" />
  <page id="/index.html"
        name="Front Page" />
  <page id="/forums"
        name="Forums" />
  <page id="/forums/search.html"
        name="Forums Search" />
</page-titles>
Pygmy Possum Page Title Resolver
A more complex resolver, used for the pygmy possum site, is provided by class: org.polliwog.resolvers.PygmyPossumPageTitleResolver.