@Override public String getRequestScheme() { return wrapped.getRequestScheme(); }
/** * @since JSF 2.0 */ public String getRequestScheme() { ExternalContext ctx = _MyFacesExternalContextHelper.firstInstance.get(); if (ctx == null) { throw new UnsupportedOperationException(); } return ctx.getRequestScheme(); }
/** * <p>The default behavior of this method is to * call {@link ExternalContext#getRequestScheme} * on the wrapped {@link ExternalContext} object.</p> * * @see javax.faces.context.ExternalContext#getRequestScheme() */ @Override public String getRequestScheme() { return getWrapped().getRequestScheme(); }
/** * <p>The default behavior of this method is to * call {@link ExternalContext#getRequestScheme} * on the wrapped {@link ExternalContext} object.</p> * * @see javax.faces.context.ExternalContext#getRequestScheme() */ @Override public String getRequestScheme() { return getWrapped().getRequestScheme(); }
/** * <p>The default behavior of this method is to * call {@link ExternalContext#getRequestScheme} * on the wrapped {@link ExternalContext} object.</p> * * @see javax.faces.context.ExternalContext#getRequestScheme() */ @Override public String getRequestScheme() { return getWrapped().getRequestScheme(); }
/** * <p>The default behavior of this method is to * call {@link ExternalContext#getRequestScheme} * on the wrapped {@link ExternalContext} object.</p> * * @see javax.faces.context.ExternalContext#getRequestScheme() */ @Override public String getRequestScheme() { return getWrapped().getRequestScheme(); }
@Override public String getRequestScheme() { return getWrapped().getRequestScheme(); }
/** * <p>The default behavior of this method is to * call {@link ExternalContext#getRequestScheme} * on the wrapped {@link ExternalContext} object.</p> * * @see javax.faces.context.ExternalContext#getRequestScheme() */ @Override public String getRequestScheme() { return getWrapped().getRequestScheme(); }
/** * <p>The default behavior of this method is to * call {@link ExternalContext#getRequestScheme} * on the wrapped {@link ExternalContext} object.</p> * * @see javax.faces.context.ExternalContext#getRequestScheme() */ @Override public String getRequestScheme() { return getWrapped().getRequestScheme(); }
/** * <p>The default behavior of this method is to * call {@link ExternalContext#getRequestScheme} * on the wrapped {@link ExternalContext} object.</p> * * @see javax.faces.context.ExternalContext#getRequestScheme() */ @Override public String getRequestScheme() { return getWrapped().getRequestScheme(); }
/** * <p>The default behavior of this method is to * call {@link ExternalContext#getRequestScheme} * on the wrapped {@link ExternalContext} object.</p> * * @see javax.faces.context.ExternalContext#getRequestScheme() */ @Override public String getRequestScheme() { return getWrapped().getRequestScheme(); }
public String getApplicationUri() { try { FacesContext ctxt = FacesContext.getCurrentInstance(); ExternalContext ext = ctxt.getExternalContext(); URI uri = new URI(ext.getRequestScheme(), null, ext.getRequestServerName(), ext.getRequestServerPort(), ext.getRequestContextPath(), null, null); return uri.toASCIIString(); } catch (URISyntaxException e) { throw new FacesException(e); } }
public String getUploadURL() { ExternalContext externalContext = FacesContext.getCurrentInstance().getExternalContext(); String protocol = externalContext.getRequestHeaderMap().get("x-forwarded-proto"); String serverName = externalContext.getRequestHeaderMap().get("x-forwarded-host"); if (null == protocol) { protocol = externalContext.getRequestScheme(); } if (null == serverName) { serverName = externalContext.getRequestServerName() + ":" + externalContext.getRequestServerPort(); } return protocol + "://" + serverName + getUploadPath(); }
public URL getActionURL(FacesContext context) throws MalformedURLException { ExternalContext externalContext = context.getExternalContext(); return new URL(externalContext.getRequestScheme(), externalContext.getRequestServerName(), externalContext.getRequestServerPort(), context.getApplication().getViewHandler().getActionURL(context, getToViewId(context))); }
public URL getResourceURL(FacesContext context) throws MalformedURLException { ExternalContext externalContext = context.getExternalContext(); return new URL(externalContext.getRequestScheme(), externalContext.getRequestServerName(), externalContext.getRequestServerPort(), context.getApplication().getViewHandler().getResourceURL(context, getToViewId(context))); }
public String generateUrlToWebservice(){ FacesContext fc = FacesContext.getCurrentInstance(); ExternalContext exContext = fc.getExternalContext(); String servername = exContext.getRequestServerName(); String port = String.valueOf(exContext.getRequestServerPort()); String appname = exContext.getRequestContextPath(); String protocol = exContext.getRequestScheme(); String pagePath = exContext.getInitParameter("pagePath"); //read it from web.xml return protocol +"://"+servername+":"+port+appname+pagePath; }
final ExternalContext ectx = context.getExternalContext(); String url = ectx.getRequestScheme() + "://" + ectx.getRequestServerName() + ":" + ectx.getRequestServerPort() + "/" + ectx.getRequestContextPath();
public URL getBookmarkableURL(FacesContext context) throws MalformedURLException { ExternalContext externalContext = context.getExternalContext(); return new URL(externalContext.getRequestScheme(), externalContext.getRequestServerName(), externalContext.getRequestServerPort(), context.getApplication().getViewHandler().getBookmarkableURL(context, getToViewId(context), _NavigationUtils.getEvaluatedNavigationParameters(context, getParameters()), isIncludeViewParams())); }
public URL getRedirectURL(FacesContext context) throws MalformedURLException { ExternalContext externalContext = context.getExternalContext(); return new URL(externalContext.getRequestScheme(), externalContext.getRequestServerName(), externalContext.getRequestServerPort(), context.getApplication().getViewHandler().getRedirectURL(context, getToViewId(context), _NavigationUtils.getEvaluatedNavigationParameters(context, getParameters()), isIncludeViewParams())); }
public static URLBuilder createContextURLBuilder() { final ExternalContext ctx = JSFUtils.getExternalContext(); URLBuilder urlBuilder = new URLBuilder(ctx.getRequestScheme() + "://" + ctx.getRequestServerName() + ":" + ctx.getRequestServerPort()); if (!StringUtils.isEmpty(ctx.getRequestContextPath())) { urlBuilder.path(ctx.getRequestContextPath()); } return urlBuilder; }