Version 4

    How to Clean out the Portal Server

     

    If you would like to remove all the sample content, configs, users, etc from the default portal distribution, you can follow the instructions on this page.  The <jboss-portal-install-dir> below refers to the location you extracted the bundled server.  If you installed via the SAR, the sar path is in italics.

     

    These instructions assume you haven't started the portal and let it build the default metadata database.  You can clean out the metadata for the portal server if you have started it already and you don't mind losing your configuration changes.  In the default portal server configuration, you can stop the server and delete the <jboss-portal-install-dir>/server/default/data/portal directory.  The portal server will rebuild this directory when it starts back up (after you've made the following configuration changes).  If you have plugged in a different data store for the PortalDS datasource, then you will need to clean out the tables in that datasource (rather than delete the directory mentioned previously) to have the server rebuild them.

     

    Alternatively, if you've already started, follow these instructions, then begin customizing.  This gives you the default stuff, but eliminates the annoying tendency to re-add stuff you've already deleted.

     

    Remove all of the Sample Pages and Portlets

    Delete the <jboss-portal-install-dir>/server/default/deploy/jboss-portal.sar/samples directory.

     

    Remove the Default Content from the CMS:

    Delete all the files in one of the following directories, but leave the default directory present.

    Standalone:  <jboss-portal-install-dir>/server/default/deploy/jboss-portal.sar/portal/cms/conf/default-content/default

    Sar version: <jboss-portal-install-dir>/server/default/deploy/jboss-portal.sar/portal-cms.sar/portal/cms/conf/default-content/default

     

    Customize the Portlets on the Default Page of the Default Portal

    You need to have one default page in the default portal, but you can modify the file at <jboss-portal-install-dir>/server/default/deploy/jboss-portal.sar/conf/data/default-object.xml to configure what is shown on that default page when the server first starts up.  This file follows the same doctype as a standard portlet object deployment descriptor http://docs.jboss.com/jbportal/v2.6/referenceGuide/html/xmldescriptors.html#desc_objectxml.

     

    Customize the Users and Roles that are Created in the Default User Repository

    You can modify the file at

    <jboss-portal-install-dir>/server/default/deploy/jboss-portal.sar/conf/hibernate/user/setup.txt to define a set of users to add to the user and role repositories.  This will only work if you are using the default database user and role implementations (HibernateUserImpl, HibernateRoleImpl).