I'm so glad to hear that it's working

Regarding getting the portal page, there is a contextual class called ThemeDisplay that has lots of getter methods on it that will help you.
You can get it like this in a backing bean:
1FacesContext facesContext = FacesContext.getCurrentInstance();
2ThemeDisplay themeDisplay = (ThemeDisplay) facesContext.getExternalContext.getRequestMap().get(WebKeys.THEME_DISPLAY);
Or if you are using the liferay-faces-portal.jar dependency, you can do this:
1LiferayFacesContext liferayFacesContext = LiferayFacesContext.getInstance();
2ThemeDisplay themeDisplay = liferayFacesContext.getThemeDisplay();
In order to get the base URL for the portal, you can call methods like PortalUtil.getPortalURL(PortletRequest);
Be kell jelentkezni ahhoz, hogy ez helytelenként legyen megjelölve.