Skip to main content


Advanced topics

Generator: GetErrorDetails

Class name:org.weborganic.berlioz.generator.GetErrorDetails
Version:Berlioz 0.9.0 - 13 October 2011


Generates no content.

This content generator is useful to display information about errors, when a Berlioz service is used for error handling.


There is no configuration directly associated with this generator.

However, since the purpose is to display servlet error details, the services using this generator should have their URLs mapped in the Web descriptor for error catching. For example:



This generator does not use and require any parameter.


This generator will try to retrieve values from the standard Servlet error request attributes.

Returned XML

This generator does not have any content, so the XML content is always empty.

Since Berlioz always wraps generators' content, the final XML is always:

<content generator="org.weborganic.berlioz.generator.GetErrorDetails"
               name="[name]" target="[target]" status="ok">
   <error http-class="[http-class]" http-code="[http-code]" datetime="[iso8601-datetime]" id="[berlioz-id]">
     <title>Not Found</title>
     <message>Not Found</message>
     <!-- Any exception will be serialized as XML here -->

Note: since this generator does produce any data, the return status is always ok .


To use this generator in Berlioz (in /WEB-INF/config/services.xml ):

<generator class="org.weborganic.berlioz.generator.GetErrorDetails"
                         name="[name]" target="[target]"/>


This generator is not cacheable..

Created on , last edited on