String pathBase = getServletContext().getRealPath("/");
String pathPages = pathBase + "/WEB-INF/pages/";
String pathFragments = pathBase + "/WEB-INF/fragments/";
itsNatServlet.addEventListener(new SPITutGlobalEventListener());
itsNatServlet.addItsNatServletRequestListener(new SPITutGlobalLoadRequestListener());
ItsNatDocumentTemplate docTemplate;
docTemplate = itsNatServlet.registerItsNatDocumentTemplate("main","text/html",
pathPages + "main.xhtml");
docTemplate.addItsNatServletRequestListener(new SPITutMainLoadRequestListener());