@Override public String getRequestPath() { return super.getRequestPath() + version; }
@Override public String getRequestPath() { return super.getRequestPath() + "&v=" + version; }
@Override public String getRequestPath() { return super.getRequestPath() + "&v=" + version; }
@Override public String getRequestPath() { return super.getRequestPath() + version; }
@Override public String getRequestPath() { return super.getRequestPath() + version; }
@Override public String getRequestPath() { ExternalContext externalContext = FacesContext.getCurrentInstance().getExternalContext(); String mapping = externalContext.getRequestServletPath(); if (externalContext.getRequestPathInfo() == null) { mapping = mapping.substring(mapping.lastIndexOf('.')); } String path = super.getRequestPath(); if (mapping.charAt(0) == '/') { return path.replaceFirst(mapping, ""); } else if (path.contains("?")) { return path.replace(mapping + "?", "?"); } else { return path.substring(0, path.length() - mapping.length()); } }
@Override public String getRequestPath() { ExternalContext externalContext = FacesContext.getCurrentInstance().getExternalContext(); String mapping = externalContext.getRequestServletPath(); if (externalContext.getRequestPathInfo() == null) { mapping = mapping.substring(mapping.lastIndexOf('.')); } String path = super.getRequestPath(); if (mapping.charAt(0) == '/') { return path.replaceFirst(mapping, ""); } else if (path.contains("?")) { return path.replace(mapping + "?", "?"); } else { return path.substring(0, path.length() - mapping.length()); } }
@Override public String getRequestPath() { String requestPath = super.getRequestPath(); if (requestPath != null) { // If the /rfRes/ token is found in the request path, then RichFaces has likely added a dynamic resource. // Such resources have not had the request path processed by ExternalContext.encodeResourceURL(String) and // are therefore incompatible with a portlet environment. int pos = requestPath.indexOf(RICHFACES_PATH_TOKEN); if (pos > 0) { // Some resources like fileUploadProgress will have an extension like ".xhtml" appended to them which // must be removed. requestPath = requestPath.replaceAll("[.]faces", ""); requestPath = requestPath.replaceAll("[.]jsf", ""); requestPath = requestPath.replaceAll("[.]xhtml", ""); // Encode the request path as a portlet ResourceURL. FacesContext facesContext = FacesContext.getCurrentInstance(); ExternalContext externalContext = facesContext.getExternalContext(); StringBuilder buf = new StringBuilder(); buf.append("/javax.faces.resource/"); buf.append(requestPath.substring(pos + RICHFACES_PATH_TOKEN.length())); requestPath = externalContext.encodeResourceURL(buf.toString()); } } return requestPath; }
@Override public String getRequestPath() { String requestPath = super.getRequestPath(); if (requestPath != null) { // If the /rfRes/ token is found in the request path, then RichFaces has likely added a dynamic resource. // Such resources have not had the request path processed by ExternalContext.encodeResourceURL(String) and // are therefore incompatible with a portlet environment. int pos = requestPath.indexOf(RICHFACES_PATH_TOKEN); if (pos > 0) { // Some resources like fileUploadProgress will have an extension like ".xhtml" appended to them which // must be removed. requestPath = requestPath.replaceAll("[.]faces", ""); requestPath = requestPath.replaceAll("[.]jsf", ""); requestPath = requestPath.replaceAll("[.]xhtml", ""); // Encode the request path as a portlet ResourceURL. FacesContext facesContext = FacesContext.getCurrentInstance(); ExternalContext externalContext = facesContext.getExternalContext(); StringBuilder buf = new StringBuilder(); buf.append("/javax.faces.resource/"); buf.append(requestPath.substring(pos + RICHFACES_PATH_TOKEN.length())); requestPath = externalContext.encodeResourceURL(buf.toString()); } } return requestPath; }