Web Descriptor

/WEB-INF/web.xml

The Web descriptor is the general configuration used by the Servlet container. For Berlioz, the main requirement is that the Berlioz servlets be declared and mapped (if necessary), so that Berlioz can be invoked and configured properly.

This section describes the Servlets that can or should be used with Berlioz.

Initialization

The most reliable mechanism to initialize Berlioz is to use the initialization servlet. It is responsible for:

  • loading the global properties;
  • checking the environment;
  • setting up the logging.

It also displays a short and useful initialisation diagnostic at startup. This servlet shouldn't be mapped.

<servlet>
  <servlet-name>Initialiser</servlet-name>
  <servlet-class>org.weborganic.berlioz.servlet.InitServlet</servlet-class>
  <load-on-startup>1</load-on-startup>
</servlet>

 

Berlioz Servlet

The Berlioz servlet is responsible for 

<servlet>
  <servlet-name>BerliozHTML</servlet-name> 
  <servlet-class>org.weborganic.berlioz.servlet.BerliozServlet</servlet-class> 
  <init-param>
    <param-name>stylesheet</param-name> 
    <param-value>/xslt/html/{GROUP}.xsl</param-value> 
  </init-param> 
  <init-param> 
  <param-name>content-type</param-name> 
    <param-value>text/html;charset=utf-8</param-value> 
  </init-param> 
  <load-on-startup>3</load-on-startup>
</servlet>

It must be mapped to a suffix or prefix.

<servlet-mapping> 
  <servlet-name>BerliozHTML</servlet-name> 
 <url-pattern>*.html</url-pattern> 
</servlet-mapping> 

 

Created on , last edited on