Tuesday, 18 May 2010

More weirdness, this time with changing context root of WebSphere Portal

Anyone here had experience of changing the default Portal context root from /wps/portal to, say, /london/portal ?

The instructions here: -


are a little imprecise re changing the context root of certain web applications e.g. PA_PortletManager.

It says this: -





  • Perform the following steps to change the context root for the Web Modules, Applications, and Portlets portlets:


    1. Log on to the WebSphere Application Server administrative console or the Deployment Manager administrative console in a clustered environment.
    2. Navigate to Applications > Enterprise Applications and the click PA_Portlet_Manager.
    3. Under Web Module Properties, click Context Root for Web Modules.
    4. Change the wps part of the /wps/PA_Portlet_Manager context root to the new URI for your company.
    5. Click Apply and then click Save.
    When you restart the application, the changes will be applied to the portlets.



    However, if I do that, and resync the nodes, restart the cluster, reboot the servers etc. etc. etc., I still get this: -

    EJPPG0017E: Web application for context root /wps/PA_Portlet_Manager is unavailable.

    as per this Technote: -


    Therefore, I'm obviously missing something .......

    Help?

    *UPDATE* As per my comment, the wonderful IBM Support team in Dublin helped me resolve this using XMLAccess.

    In essence, I exported all of the portlets using the XMLAccess command: -

    /opt/IBM/WebSphere/PortalServer/bin/xmlaccess.sh -in /opt/IBM/WebSphere/PortalServer/doc/xml-samples/ExportAllPortlets.xml -out ~/AllPortlets.xml -url http://localhost:10040/wps/config -user wpsadmin -password passw0rd

    I then extracted the relevant portion of the AllPortlets.xml file, related to PA_Portlet_Manager, into a new XML file ( PA_Portlet_Manager.xml  ), and modified the context root from: -

                /wps/PA_Portlet_Manager

    to: -


                /london/PA_Portlet_Manager

    and then reimported the new configuration using XMLAccess: -

    /opt/IBM/WebSphere/PortalServer/bin/xmlaccess.sh -in ~/PA_Portlet_Manager.xml -url http://localhost:10040/wps/config -user wpsadmin -password passw0rd

    Having restarted the Portal cluster, all now appears well






  • 6 comments:

    Dave Hay said...

    Thanks to my IBM Dublin colleague, Willy, I think I now have a fix for this.

    For some reason, the PA_Portlet_Manager web application simply refused to pick up the context root change to /london/ until I used XMLAccess to re-import it's configuration.

    I'll upload the XMLAccess script that I used, but we now have a solution

    Cre8Domain said...

    Hey Dave...i have been following your blog, its kind of manual :) great work, can you please post us the script that you have used while changing portal URI..Thanks

    Dave Hay said...

    @Arduous Sure, will do so tomorrow (Friday)

    Unknown said...

    hello Dave, great site u have here, i want to change the whole Portal project and i have tried changing some of the enterprise modules' context roots from /wps/myportal to the one i prefer i only managed to change the login page only, if i try to log in am getting an error that says there are no WebGroups/Virtual Hosts defined, can u please help me change the

    Dave Hay said...



    This isn't something I've tried in a long while ( May 2010 ), but it's pretty well documented here: -

    Changing the context root of WebSphere Portal

    http://www-01.ibm.com/support/docview.wss?uid=swg21507613


    Unknown said...

    thank you very much Dave...

    Reminder - installing podman and skopeo on Ubuntu 22.04

    This follows on from: - Lest I forget - how to install pip on Ubuntu I had reason to install podman  and skopeo  on an Ubuntu box: - lsb_rel...