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 the following:
- Loading the global properties.
- Checking the environment.
- Setting up the logging.
It also displays a short and useful initialization diagnostic at startup. This servlet shouldn’t be mapped.
<servlet> <servlet-name>Initializer</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>