WebSphere Portal: Remove “/wps/portal” from URL

IBM finally provides us a way to remove "/wps/portal" in WebSphere Portal *pops champagne*. Do take note that this only applies to WebSphere Portal v8.5 CF8 onwards.

Take note (as of WebSphere Portal v8.5 CF8): After you have successfully remove “/wps/portal”, the system will not be unable to locate all previous custom themes that you have created earlier. You will need to run xmlaccess manually to remove “/wps” from the theme context-path.
“EJPFD0097E: No theme was found to render the page. Navigate to Administration and assign a working theme to restore full function to your site.”


Do the following steps to remove “/wps/portal”:

  1. Start cw_profile. Open your cmd and go to <app_server>\ profiles\cw_profile\bin and type “startServer.bat server1“.
  2. Go to Configuration Wizard (http://<server_ip>:10200/ibm/wizard).
  3. Login in with admin ID for cw_profile profile.
  4. Click “Set Up a Stand-alone Server > Modify Site URLs for Search Engine Optimization” or “Set Up a Cluster > Modify Site URLs for Search Engine Optimization” depending on your environment type.
  5. Click on “URL Settings” and select “Yes” for “Do you want to modify or remove your context root” field blank. (as of WebSphere Portal v8.5 CF8) I would not remove navigation state information using this method as this will cause default portal 8.5 theme to lose its navigation state as well. A better method will be this.
  6. Click on the “Next” arrow.
  7. Key in the required admin information and leave “Context root” and “
  8. Click on “Start Configuration” button.
  9. Click on “OK” button.
  10. The wizard will pause at certain manual steps. Click on the “Instructions” link to follow through the manual configuration.
  11. Congrats! You have remove “/wps/portal” from the url!


Removing Extra Space Underneath An Image

You have already applied normalize.css but there is still additional white space underneath an image. This is because the browsers by default will recognize the images as an inline-element, hence additional “line-height” is apply.

For example, key in the following html:

<div style='border:1px solid red;'>
 <img src='marvel.jpg'/>

Noticed that extra space (line-height)?


  1. Either add in “display:block” to the image
    <div style='border:1px solid red;'>
     <img src='marvel.jpg' style='display:block;'/>
  2. Or add in “line-height:0” to the containing dom
    <div style='line-height:0;border:1px solid red;'>
     <img src='marvel.jpg'/>

IBM WebSphere Portal Woes

We have been working with IBM WebSphere Portal for almost 8 years (from version 6.0 to 8.5) and we often realized that there are some points that IBM sales personnels deliberately wouldn’t let you know.

Disclaimer: We are still happy with IBM WebSphere Portal.

Poor PMR (aka Service Request) support

They wouldn’t attempt to read and replicate the issue in their own environment on their first reply (despite how much information you have provided them).

For example, we had reported recently that the Top Left Edit Tools in WebSphere Portal v8.5 were not showing in the latest Chrome version (44.0.2403.125) and even pointed out that we had experienced similar issue with the portal provided in one of the IBM training workshops.

We were thinking that L2 should be able to replicate the issue easily as L2 just need to update his Chrome browser. We are wrong:

Didn’t mean to be mean but we have already tried our best to provide you as much information as we could and it is really difficult to get trace.log from client environment with all the red tapes involved. Plus in this case, all you need to do is to update your Chrome browser to the latest version:

Mystery resolved (once L2 decided to update his browser and escalated the issue):

2) You can’t get rid of “/wps/portal” in your URL

Windows Update Takes Forever to Update

One of my Windows 2008 R1 servers suddenly refuses to update. The process seems to be taking forever (or rather stuck) even for searching for updates.

Luckily the solution for me is simple:

  • At the Task Manager, search for “wuauserv” process (in Window 10, search for Windows Update) and stop the process.
  • Delete all of the files found under C:\Windows\SoftwareDistribution directory
  • Run Windows Update (issue should be resolved)

WebSphere Portal – Error 404: EJCBD0006E: The resolution of a URI failed. Refer to the SystemOut.log for more detailed information.

If you are encountering the following errors:

  • “Error 404: EJCBD0006E: The resolution of a URI failed. Refer to the SystemOut.log for more detailed information.” .
  • And your SystemOut.log is returning you:
    [7/30/15 15:11:47:539 SGT] 00000124 ExceptionLogg W com.ibm.wps.logging.ExceptionLogger logThrowable An exception occurred: [EJCBC0009E: The entity [[ObjectIDImpl 'Z6_00000000000000A0BR2B300G10', CONTENT_NODE, VP: 16576, [Domain: rel], DB: C040-000000000000000080026B8B35008001]] could not be be found.]. Enable traces for [com.ibm.wps.logging.ExceptionLogger=all] to see the exception stack trace.
    [7/30/15 15:11:47:543 SGT] 00000124 ResolvedPrepr I com.ibm.wps.resolver.portal.ResolvedPreprocessor process The resolution process failed, for more details enable tracing for [com.ibm.wps.resolver.portal.ResolvedPreprocessor=all].


This might be a issue with the “Web Content Authoring” page under Hidden Pages (Content Root > Hidden Pages > Web Content Authoring).

  1. Go to Administration > Portal User Interface > Manage Pages.
  2. Ensure that “Web Content Authoring” page is Active.
  3. Ensure that the particular user has a USER role for that page.


Notes on Regular Expression

  1. What is the difference between “*” and “+”?
    “*” will match the character zero or more times whereas “+” will match one or more times. For example, “\d*” regular expression will return the following results for:

    • 2b – will match “2b”
    • 3ab – will match “b” (since digit character is optional)

    Now consider “\d+” regular expression:

    • 2b – will still match “2b”
    • 3ab – will not return any match as “+” required one or more times matches.
  2. <continue…>

Javascript: How to Calculate Number of Working Days?

Date.workingDaysFrom(fromDate) calculates the number of working days between 2 Date objects (excluding weekends; Sat and Sun). The method will return “-1” if the fromDate is an invalid Date object or is later than the compared Date.

Do take note that this method does not take public holidays into consideration and each date is consider as a full day.

 // ensure that the argument is a valid and past date
 if(!fromDate||isNaN(fromDate)||this<fromDate){return -1;}

 // clone date to avoid messing up original date and time
 var frD=new Date(fromDate.getTime()),
     toD=new Date(this.getTime()),

 // reset time portion

  var day=frD.getDay();
 return numOfWorkingDays;



Comparing 8-Jul-2015 (Wed) to 13-Jul-2015 (Mon)

var startDate = new Date("8/8/2015");
var endDate = new Date("13/8/2015");
endDate.workingDaysFrom(startDate); // returns 4

Comparing same date, 8-Jul-2015 (Wed)

var startDate = new Date("8/8/2015");
var endDate = new Date("8/8/2015");
endDate.workingDaysFrom(startDate); // returns 1


How to Generate Facebook Access Token for Public Page Feed?

Most clients would prefer a customized Facebook feed (especially those supporting multiple social media) , hence this bring us to this question:

“What is the easiest method to generate a Facebook access token just to retrieve their public page feed?”

A simple step is to create an “empty” Facebook application and use its access token (note that most likely the UI is going to change but the idea is there):

  1. Go to https://developers.facebook.com/apps/
  2. Go to “Add a New App” (My Apps > Add a New App).
  3. Select “WWW” (or any) and click on “Skip and Create App ID”.
  4. Give the application a suitable name and namespace for future reference.
  5. Grats! You have generated your own access token! For secret key, remember to click on the “Show” button.
  6. To verify, key in the following url and you should be able to see the public page feed:
    https://graph.facebook.com/v2.3/<page id>/posts?access_token=<App ID – as shown in above image>|<App Secert>

Just another WordPress site