diff --git a/src/main/webapp/custom_jsps/html/portlet/dockbar/custom_dockbar_view.jspf b/src/main/webapp/custom_jsps/html/portlet/dockbar/custom_dockbar_view.jspf
index 7eea778..28f98be 100644
--- a/src/main/webapp/custom_jsps/html/portlet/dockbar/custom_dockbar_view.jspf
+++ b/src/main/webapp/custom_jsps/html/portlet/dockbar/custom_dockbar_view.jspf
@@ -1,12 +1,10 @@
<%@ page import="org.gcube.common.portal.GCubePortalConstants" %>
-
+<%@ page import="org.gcube.common.portal.PortalContext" %>
<%
- //themeDisplay.getUser().getScreenName();
- String currentVirtualHost = request.getServerName();
- String groupName = currentVirtualHost.split("\\.")[0];
-
- String mySiteURL = GCubePortalConstants.PREFIX_GROUP_URL + "/" + groupName;
+ PortalContext context = PortalContext.getConfiguration();
+ String groupName = context.getGatewayName(request);
+ String mySiteURL = context.getSiteLandingPagePath(request);
%>