+

Search Tips   |   Advanced Search

Sample XML configuration files

Sample files are provided for the reference to help illustrate how to use XML configuration for different portal configuration purposes. Before using them, read the other topics about the XML configuration interface carefully. Many of the samples need to be modified with valid page or user name before they can be used.


Sample file location

The sample XML configuration files provided with the portal are located in: PORTAL_HOME/doc/xml-samples.


Sample file list

Some of the XML samples are listed in the following. This list is not complete. All samples are located under the directory given in the previous section.

    Export.xml
    ExportRelease.xml
    ExportPage.xml
    ExportPageResult.xml
    CreatePage.xml If we do not want to set the page title for all portal supported locales, we need to set it at least for the default system locale of the portal.
    CreateCsaPage.xml
    CreateLegacyPage.xml
    CreatePageFromZip.xml
    CreatePageFromTemplate.xml
    DeployPortlet.xml
    ClonePortlet.xml
    ModifyPortlet.xml
    ExportPortletAndPage.xml
    ExportSubTree.xml
    UpdateAccesscontrol.xml
    UpdateVault.xml
    CopyPage.xml
    CreateURL.xml
    CreateUser.xml
    CreateLanguage.xml Add a new language for the portal or removes an existing language from the portal. To define a new language for the portal, set the title for the new language in all locales supported for the portal in the XML file. If we do not want to set the title for all portal supported locales, we need set the title at least for the default system locale of the portal.
    DeployTheme.xml
    ExportAllPortlets.xml
    Transaction.xml
    MovePage.xml The actual move of the page is done by the last two lines.
    ActivatePortlet.xml Change the states of portlets, portlet applications, or Web applications between active and inactive by setting the attribute active of the appropriate tag to true (for active) or false (for inactive). The sample activates the respective resources.
    Task.xml Create a scheduler task for cleaning up portal resources, com.ibm.portal.datastore.task.ResourceCleanup.
    RegisterPreDeployedEAR.xml Install a predeployed portlet. We might have to change this sample for the requirements. For the deploy_target_directory in the url tag specify the directory to which you deployed the EAR file on the WAS. The default target directory is AppServer, but when deploying portlets for the portal it is a good option to specify PortalServer as the target directory. An Enterprise Application Archive (EAR) can hold more than one Web Application Archive (WAR) files. To configure the pre-deployed portlet resources into portal reference each Web Application resource separately in the XML configuration script. Provide a dedicated <web-app statement with the corresponding data in the XML script for every WAR file containing a portlet application in that EAR file.
    CleanupUsers.xml Identify users and groups in the portal database who have been removed from the user registry, but not from the portal database. In order for the file to work properly, set both attributes cleanup-users and export-users to true . Running this sample file results in a file that lists those users and groups and marks them for deletion. The result file also lists all users who have been muted, for example after too many wrong password attempts. Before you re-import the file, check the file and remove all users and groups to keep in the portal database. During XML import all users and groups that remain listed in the file will be removed from the portal database. After deleting these entries via the modified XML script, all customizations are lost for the deleted users and groups.
    ExportIncludingOrphanedData.xml Export all orphaned data. We do this to prepare for deleting the orphaned data. Note that this sample uses the request type export-orphaned-data.


Parent XML configuration reference

Related tasks:

Export a Producer definition using xmlaccess.sh
Create a Producer definition and consuming a portlet by a single XML script

Related reference:

XML samples for creating or removing language definitions
XML samples for creating Producer definitions