/** * Calculates the current viewId - we can't get it from the ViewRoot if it's not available. * * @param context The {@link FacesContext}. * @return The current viewId. */ public static String calculateViewId(FacesContext context) { Map<String, Object> requestMap = context.getExternalContext().getRequestMap(); String viewId = (String) requestMap.get("javax.servlet.include.path_info"); if (viewId == null) { viewId = context.getExternalContext().getRequestPathInfo(); } if (viewId == null) { viewId = (String) requestMap.get("javax.servlet.include.servlet_path"); } if (viewId == null) { viewId = context.getExternalContext().getRequestServletPath(); } return viewId; }
@Override public String getRequestServletPath() { return wrapped.getRequestServletPath(); }
/** * {@inheritDoc} */ public String getRequestServletPath() { return wrapped.getRequestServletPath(); }
/** * {@inheritDoc} */ public String getRequestServletPath() { return wrapped.getRequestServletPath(); }
/** * @see Faces#getRequestServletPath() */ public static String getRequestServletPath(FacesContext context) { return context.getExternalContext().getRequestServletPath(); }
/** * @see Faces#getRequestServletPath() */ public static String getRequestServletPath(FacesContext context) { return context.getExternalContext().getRequestServletPath(); }
@Override public boolean isResourceRequest(FacesContext context) { return ResourceHandler.RESOURCE_IDENTIFIER.equals(context.getExternalContext().getRequestServletPath()); }
/** * <p>The default behavior of this method is to * call {@link ExternalContext#getRequestServletPath} * on the wrapped {@link ExternalContext} object.</p> * * @see javax.faces.context.ExternalContext#getRequestServletPath() */ @Override public String getRequestServletPath() { return getWrapped().getRequestServletPath(); }
private static String getFullPath(ExternalContext externalContext) { String path = externalContext.getRequestServletPath(); String pathInfo = externalContext.getRequestPathInfo(); if (null != pathInfo) { path = path + pathInfo; } return path; }
private String getScopeViewKey(ExternalContext extCtx) { String scopeIdKey = null; String pathInfo = extCtx.getRequestPathInfo(); String servletPath = extCtx.getRequestServletPath(); if (pathInfo == null) scopeIdKey = servletPath; else if (servletPath == null) scopeIdKey = pathInfo; else scopeIdKey = servletPath + pathInfo; return scopeIdKey; }
@Override public String getRequestServletPath() { return getWrapped().getRequestServletPath(); }
/** * <p>The default behavior of this method is to * call {@link ExternalContext#getRequestServletPath} * on the wrapped {@link ExternalContext} object.</p> * * @see javax.faces.context.ExternalContext#getRequestServletPath() */ public String getRequestServletPath() { return getWrapped().getRequestServletPath(); }
/** * <p>The default behavior of this method is to * call {@link ExternalContext#getRequestServletPath} * on the wrapped {@link ExternalContext} object.</p> * * @see javax.faces.context.ExternalContext#getRequestServletPath() */ @Override public String getRequestServletPath() { return getWrapped().getRequestServletPath(); }
/** * <p>The default behavior of this method is to * call {@link ExternalContext#getRequestServletPath} * on the wrapped {@link ExternalContext} object.</p> * * @see javax.faces.context.ExternalContext#getRequestServletPath() */ @Override public String getRequestServletPath() { return getWrapped().getRequestServletPath(); }
/** * <p>The default behavior of this method is to * call {@link ExternalContext#getRequestServletPath} * on the wrapped {@link ExternalContext} object.</p> * * @see javax.faces.context.ExternalContext#getRequestServletPath() */ public String getRequestServletPath() { return getWrapped().getRequestServletPath(); }
/** * <p>The default behavior of this method is to * call {@link ExternalContext#getRequestServletPath} * on the wrapped {@link ExternalContext} object.</p> * * @see javax.faces.context.ExternalContext#getRequestServletPath() */ @Override public String getRequestServletPath() { return getWrapped().getRequestServletPath(); }
/** * with rewriting, the filter chain might not have access to the post-rewrite request information. * we'll save some of the information that we may need. */ private static void saveRequestPath(ExternalContext externalContext) { Map<String, Object> map = externalContext.getRequestMap(); map.put("org.jboss.seam.web.requestServletPath", externalContext.getRequestServletPath()); map.put("org.jboss.seam.web.requestContextPath", externalContext.getRequestContextPath()); map.put("org.jboss.seam.web.requestPathInfo", externalContext.getRequestPathInfo()); }
private static String getResourcePath(FacesContext facesContext) { ExternalContext externalContext = facesContext.getExternalContext(); String path = externalContext.getRequestServletPath(); if (null == path) { path = externalContext.getRequestPathInfo(); } return (externalContext.getRequestContextPath() + path); } }
public static FacesServletMapping getFacesServletMapping(final FacesContext facesContext) { Map<Object, Object> attributes = facesContext.getAttributes(); // Has the mapping already been determined during this request? FacesServletMapping mapping = (FacesServletMapping) attributes.get(FacesServletMapping.CACHED_SERVLET_MAPPING); if (mapping == null) { ExternalContext externalContext = facesContext.getExternalContext(); mapping = FacesServletMapping.calculateFacesServletMapping(externalContext.getRequestServletPath(), externalContext.getRequestPathInfo()); attributes.put(FacesServletMapping.CACHED_SERVLET_MAPPING, mapping); } return mapping; }
@Override public String getActionURL(FacesContext context, String viewId) { if (SpringFacesContext.getCurrentInstance() != null) { String actionViewId = (String) context.getAttributes().get(ACTION_ATTRIBUTE); if (actionViewId != null && actionViewId.equals(viewId)) { ExternalContext externalContext = context.getExternalContext(); return externalContext.getRequestContextPath() + externalContext.getRequestServletPath() + externalContext.getRequestPathInfo(); } } return super.getActionURL(context, viewId); }