+

Search Tips   |   Advanced Search

Change the portal URI

IBM WebSphere Portal and Web Services for Remote Portlets are installed with a URI set either during, or after installation.

When changing the WebSphere Portal URI, do not specify a value that is the same as a directory that exists in a portlet WAR directory. For example, set the WebSphere Portal context root to /images. There is a portlet with the directory structure...

    /myPortlet.ear/myPortlet.war/images

This issue might cause a conflict if the portlet encodes URI references to resources in its own /images directory. In this situation, the portlet would be unable to display images. WebSphere Portal looks for the image resources according to its own context root path instead of the directory path specified by the portlet WAR file.

Changing the producer context root does not require redeploying all portlets. Run the modify-servlet-path configuration task only.


Modify the WebSphere Portal context root

  1. Stop the WebSphere_Portal server.

  2. Make backups of wkplc.properties and wkplc_comp.properties files in...

      WP_PROFILE/ConfigEngine/properties

  3. Edit wkplc.properties and set value for...

    • WpsContextRoot

  4. Edit wkplc_comp.properties file and set values for...

    • WsrpContextRoot
    • WpsPersonalizedHome
    • WpsDefaultHome

    Do not enter the same value for WpsPersonalizedHome and WpsDefaultHome.

  5. Start dmgr, portal, agent servers

  6. Change the WebSphere Portal URI...

      cd WP_PROFILE/ConfigEngine
      ./ConfigEngine.sh modify-servlet-path -DPortalAdminPwd=foo -DWasPassword=foo

    Check the output for any error messages before proceeding with the next task. If ConfigEngine tasks fail, verify the values in wkplc.properties and wkplc_comp.properties.

  7. Restart the WebSphere_Portal server.

  8. Change the context root for portlets...

      ./ConfigEngine.sh modify-servlet-path-portlets -DPortalAdminPwd=foo -DWasPassword=foo

    If ConfigEngine tasks fail, verify the values in wkplc.properties and wkplc_comp.properties.

    Validate the servlet path change is also reflected in the HTTPBasicAuthTAI configuration. From the WAS console...

      Security | Global Security | Web and SIP security | Trust association | Interceptors | com.ibm.portal.auth.tai.HTTPBasicAuthTAI | urlWhiteList

    If necessary, update the urlWhiteList to reflect the servlet path change.

  9. Start dmgr, portal, agent servers

  10. For an external web server, such as an HTTP Server:

    1. Run the web server configuration script.

      Environment Steps
      Stand-alone

      1. From web server host, copy plugin script to Portal host...

          scp plugin_root/bin/configurewebservername.sh wasadmin@wphost:WP_PROFILE/bin

        where webservername is the web server definition name defined when configuring the HTTP Server for WebSphere Portal, for example...

          configurewebserver1.sh

      2. From portal host, create the web server definition in WAS...

          cd WP_PROFILE/bin
          ./configurewebservername.sh

      Clustered

      1. On the Deployment Manager server:

          scp plugin_root/bin/configurewebservername.sh wasadmin@dmgr_host:/dmgr_profile/bin

        where webservername is the web server definition name defined when configuring the HTTP Server for WebSphere Portal, for example...

          configurewebserver1.sh

      2. From the dmgr host, configure the webserver within WAS...

          cd dmgr_profile/bin
          ./configurewebservername.sh

    2. Regenerate the web server plug-in in WebSphere Application Server.

      For a remote web server, copy the generated plugin-cfg.xml file to the remote server.

      Do NOT complete these steps if we are changing only the producer URI.

    3. Restart the web server.

    4. Restart the WebSphere_Portal server.

  11. Update the registered Application URI entries in the JCR.ICMSTJCRNODEREGISTER table:

    In a clustered environment, complete these steps on the primary node only.

    1. Stop the WebSphere_Portal server.

    2. Back up the database.

    3. Start the WebSphere_Portal server.

    4. To unregister the node types:

      • Open the ibmcontentwcm.registernodetypes file, which is in the /WebSphere/PortalServer/wcm/prereq.wcm/config/nodetypes/ directory.

      • Change <registerAction action="register"/> to <registerAction action="deregister"/>.

      • Save the changes.

      • Run the following task:

          ./ConfigEngine.sh action-register-wcm-nodetypes -DWasPassword=foo -DPortalAdminPwd=foo

    5. To register the node types:

      • Open the ibmcontentwcm.registernodetypes file, which is in the /WebSphere/PortalServer/wcm/prereq.wcm/config/nodetypes/ directory.

      • Change <registerAction action="deregister"/> to <registerAction action="register"/>.

      • Update all lines containing the <ApplicationURI name="wps/mypoc/?view=auth&uri=wcm:oid:"/> content.

        Change the name of the attribute value to reflect the new WpsContextRoot value found in wkplc.properties. For example, if the original value for WpsContextRoot was wps and the new value is wp8, change the lines to <ApplicationURI name="wp8/mypoc/?view=auth&uri=wcm:oid:"/>.

      • Run the following task:

          ./ConfigEngine.sh action-register-wcm-nodetypes -DWasPassword=foo -DPortalAdminPwd=foo

    6. Run the following SQL query to verify the entries in the table now show the new URI:

        select * from JCR.ICMSTJCRNODEREGISTER

    7. Restart the WebSphere_Portal server.

  12. If we use WCM, change the JSP components in the Web Resources v70 Library:

    In a clustered environment, complete these steps on the primary node only.

    1. Log on to WebSphere Portal and go to...

        Applications | Content | Web Content Management | Preferences | Edit Shared Settings | Library Selection

    2. Add "Web Resources v70" to the Selected Libraries list and click OK.

    3. Go to...

        Item Views | All Items | All | Components | JSP

      ...and select every JSP component from the Web Resources v70 library

    4. Click Edit.

    5. Update the Path field for every JSP component with the new context root path.

      The JSP path includes two parts, which are separated by a semi-colon. The first part is the context path to the Web Content Manager extensions web application and then the second part is the path to the JSP. Update the path to the web application. For example, the other path might be...

        /wcmextension;/jsp/html/general/UpdateItem.jsp

      If we changed the context root to mynewcontext, change the old path to...

        /mynewcontext/wcmextension;/jsp/html/general/UpdateItem.jsp

  13. Optional: Update the custom themes to reference the correct Dojo context root.

    The default Dojo context root in WebSphere Portal is...

      /wps/portal_dojo

    After running the modify-servlet-path and modify-servlet-path-portlets tasks, the Dojo context root is changed to include the new value in the WpsContextRoot parameter as the prefix. For instance, if the new WpsContextRoot value is myco, then the new Dojo context root becomes...

      /myco/portal_dojo

    If the theme includes hardcoded references to "/wps/portal_dojo", update those references to the new context root. Migrated custom themes might have references to /portal_dojo without the /wps prefix. Look for these references in both the WAR file and in the WebDAV storage for the theme.

    In a clustered environment, complete these steps on the primary node only.

  14. To update context root for search collections...

    1. Log on to WebSphere Portal as the administrator, and select the search collection to update...

        Administration | Search Administration | Manage Search | Search Collections | search collection

      For example: Default Search Collection.

    2. Click "Edit Content Source" icon for the first content source in the list.

    3. Edit the URL listed in the Collect documents link from the URL with the new context root.

    4. Click Save.

    5. Edit the URL in each remaining content source and then save the changes.

    6. Start the crawler content source for each collection:

      • If the documents are not stored in the search collection but a schedule is defined for the crawler, the crawler automatically runs at the scheduled time. We can also start the crawler manually.

      • If the documents are already corrected, to update the documents with the new context root information. select...

          Regather documents

    7. Click...

        Collections from All Services (breadcrumb trail)

      ...and select the next search collection to modify.

  15. Complete the following steps if we changed the context root and we have existing search scopes:

    1. Click...

        the Administration | Search Administration | Manage Search | Search Scopes

    2. Delete the following search scopes:

      • All Sources
      • Managed Web Content

    3. Restart the portal server to re-create the search scopes with the correct context.

  16. To change the context root for the Seedlist_Servlet:

    1. Log in to the WAS console and got o...

        Applications | Application Types | WebSphere enterprise applications | Seedlist_Servlet | Context Root For Web Modules

    2. Change the context root and then click OK.

  17. Resynchronize the nodes and restart the cluster.

    Cluster type Steps
    Static cluster

    1. From the dmgr console, synchronize...

        System Administration | Nodes | primary node | Full Resynchronize

        • Stop the cluster

            Servers | Clusters | cluster | Stop

        • After the cluster stops, restart it by selecting the cluster. Then, click Start.
    Dynamic cluster

    1. Synchronize...

        System Administration | Nodes | primary node | Full Resynchronize

    2. Stop the cluster...

        Servers | Dynamic Clusters | dynamic cluster | Click Dynamic cluster members.

        • Select the member name to stop and then click Stop.

        • Select the member name to start and then click Start.

  18. To create the WebSphere environment variables required by Web Content Manager, complete the following on each node within the cluster...

    1. Go to...

        WP_PROFILE/ConfigEngine/properties

      ...and make backups of wkplc.properties and wkplc_comp.properties files on the additional nodes.

    2. Edit wkplc.properties file and enter the appropriate value for the environment for...

        WpsContextRoot

    3. Edit wkplc_comp.properties file and enter the appropriate value for the environment for...

      • WsrpContextRoot
      • WpsPersonalizedHome
      • WpsDefaultHome

      Do not enter the same value for WpsPersonalizedHome and WpsDefaultHome.

    4. Create the WebSphere environment variables for Web Content Manager:

        ./ConfigEngine.sh create-wcm-servletpath-variables -DServerName=your_application_server_name -DWasPassword=foo

      Check the output for any error messages before proceeding with the next task. If ConfigEngine tasks fail, verify the values in wkplc.properties and wkplc_comp.properties.

  19. Resynchronize the nodes and restart the cluster.


WSRP context root

Note that with with Version 8, the URI of the context root for the producer is /wps/wsrp. Before Version 8, this context root was /wsrp. If we migrated from an earlier version, you still might have consumers that attempt to access the producer with the previous context root (/wsrp). We can correct this issue in one of the following ways:

  • Modify the context root for the producer to...

      /wsrp

    This change enables the Consumers to access the Producer without requiring further changes to the Consumers.

  • Update the configuration of the consumers to use the new context root...

      /wps/wsrp


WCM syndication

If we use WCM syndication, update the syndicator and subscriber servers that refer to the Portal instance with the modified URI.

Log on to the WebSphere Portal syndicating to this instance, go to...

    Administration menu | Portal Content | Syndicators | syndicator | Edit icon

...and update the URL with the new context root information.

Log on to the WebSphere Portal subscribing to this instance, go to...

    Administration menu | Portal Content | Subscribers | subscriber | Edit

...and update the URL with the new context root information.

If we modify the URI in a clustered environment, complete the steps described here on the primary node only, except where specified differently. Additionally, verify that AutoSynch is set to a frequency of 1 minute.

Note that, in addition to the steps below, another place the default context root can be changed is during installation on the panel...

    Configuration for IBM WebSphere Portal: Profile configuration details: Advanced


Parent WebSphere Portal

Related tasks:
Access the Configuration Wizard