How to read Base Url in a Portlet

I have multiple links of the Left Hand side ( fabric tasks ). I want to read the base URl. However everything is giving me null. I can see all the data in PortlrtInfo portlet from Sysadmin. However how do I accesss those variables ??
Help Needed

To make sure we are both talking about the same thing, can you please provide an example of what you are expecting the base url to look like?

Actually I have multiple fabric tasks on the left hand side.
However I want them to point to the same portlet, and I will change the content of the portlet based on what
task was clicked to get the portlet.

I have defined aliases for all the fabric tasks.
eg. onBoardSD and onBoardBD and the final link looks like


I want to read the last part and change the content of the portlet. I think this is the only way to detect how the portlet was opened.

I also checked the default “PortletInfo” portlet and it displays the URL in “pathInfo” and “requestURI”

however in my code both of these ( getFacesContext().getExternalContext().getRequestPathInfo() )are giving “null”

Ok. I’m glad I asked. I thought you meant something else.

Please try this:

HttpServletRequest originalReq = com.webmethods.portal.framework.impl.PortalServlet.getCurrentRequest();

String pageReqUri = originalReq.getRequestPathInfo();

Hi Eric,
could not find getRequestPathInfo(); in the object but “getRequestURL()”; pretty much gives the same thing :). Thanks a lot :slight_smile: :slight_smile: