Skip to main content


Advanced topics

Generator: GetContentFolderInfoAuto

Class name:org.weborganic.bastille.psml.GetContentFolderInfoAuto
Version:0.7.5 - 25 October 2012


Returns information about a folder from the PSML content folder using the Berlioz path.

This generator behaves as if it were using the Berlioz path as path parameter of the Generator: GetContentFolderInfo generator.

The Berlioz path depends on the mapping of the Berlioz servlet in the Web descriptor (web.xml) and usually corresponds to the value of the * in the path component of a matching URL. The Berlioz path is then appended to the /content folder with the added .psml extension to identify the file to load.



No configuration is required.

The root of the PSML folder can be configured using the global property bastille.psml.root which can be either an absolute path or a relative path from the global repository.

By default, the PSML root is set to psml which usually corresponds to the /WEB-INF/psml folder of your Web app.


This generator does not accept or require any parameter.

Returned XML

The top level element is always the requested folder. Its child elements are either sub folders or files within that folder.

<file name="[folder name]" path="[folder path]" type="folder">
  <!-- for each sub folder ... -->
  <file name="[file name]" path="[file path]" type="folder">
    <!-- more files and subfolders  -->
  <!-- for each file ... -->
  <file name="[file name]"
        path="[file path]"
     length="[file size in bytes]"
   modified="[last modified date]"/>

Error handling

Folder does not exist

If the folder cannot be found this generator returns the following:

<file name="[file name]" path="[base path]" status="not-found"/>


<generator class="org.weborganic.bastille.psml.GetContentFolderInfoAuto" ... />
Created on , last edited on