Sample XML configuration files
Sample files are provided for your reference to help illustrate how to use XML configuration for different portal configuration purposes.
Before you use them, read the other topics about the XML configuration interface carefully.
Sample file location
The sample XML configuration files provided with WebSphere Portal are located in... portal_server_root/base/wp.xml/doc/xml-samples.
Sample file list
The following samples are available:
- Export.xml
- ExportRelease.xml
- ExportPage.xml
- ExportPageResult.xml
- CreatePage.xml
- DeployPortlet.xml
- ClonePortlet.xml
- ModifyPortlet.xml
- ExportPortletAndPage.xml
- ExportSubTree.xml
- UpdateAccesscontrol.xml
- UpdateVault.xml
- CopyPage.xml
- CreateURL.xml
- CreateUser.xml
- CreateLanguage.xml: This XML sample adds Welsh as a new language for the portal.
To define a new language for your portal, set the title for the new language in all locales that are supported for your portal in the XML file. If you do not want to set the title for all portal supported locales, you need set the title at least for the default system locale of your portal.
- DeployTheme.xml
- ExportAllPortlets.xml
- Transaction.xml
- MovePage.xml
The actual move of the page is done by the last two lines.
- ActivatePortlet.xml
Use this sample to 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
This sample creates a scheduler task for cleaning up portal resources, com.ibm.portal.datastore.task.ResourceCleanup.
- RegisterPreDeployedEAR.xmlUse this sample to install a predeployed portlet. You might have to change this sample for your requirements.Notes:
- 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 your portal it is a good option to specify PortalServer as the target.
- This XML sample script works only for portlets that are written to comply with the IBM Portlet API. For portlets written according to the Standard Portlet API you have to adapt the sample. In this case consider the following hints:
- With the web-app tag Standard API portlets do not have a uid attribute. Use the id attribute of the portlet-app tag in the file portlet.xml instead. Append webmod to the end of the id attribute to make up the uid.
- With the portlet-app tag Standard API portlets do not have a uid attribute. Use the id attribute of the portlet-app tag in the file portlet.xml instead.
- With the portlet-app tag Standard API portlets do not have a name attribute. Remove the tag for Standard API portlets.
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 that contains a portlet application in that EAR file.
- CleanupUsers.xml
Use this sample to 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 that you want 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
Use this sample file to perform an export that includes all orphaned data. You do this to prepare for deleting the orphaned data. Note that this sample uses the request type export-orphaned-data.
Parent topic
The XML configuration interface
Related concepts
Manage portal resources with policies
About the XML configuration interface
Related tasks
Deploying J2EE resources with portlet application WAR files
Exporting a Producer definition by using the XML configuration interface
Creating a Producer definition and consuming a WSRP service by a single XML script
Related reference
Sample Policy XML configuration files
Changes to the XML configuration interface for this version of portal
XML configuration reference
XML samples for creating Producer definitions
Automated tasks for composite applications
Related information
Work with the XML configuration interface