As we transition to the new Hyland Community, some post links may be temporarily disrupted as we finalize redirects. We apologize for the inconvenience and are working to resolve this as quickly as possible. Details.
HttpServletRequest request = (HttpServletRequest)FacesContext.getCurrentInstance().getExternalContext().getRequest(); //Request URL final String requestURL = request.getRequestURL().toString(); //Context path final String requestcontextPath = request.getContextPath(); //Server - URL this.serverUrl = requestURL.substring(0, requestURL.indexOf(requestcontextPath));