ExternalContext ext = processContext.getExternalContext();
ExternalContext ext = processContext.getFacesContext() .getExternalContext();
    public String getBaseURI(IProcessContext processContext) {        ExternalContext ext = processContext.getExternalContext();        Map request = ext.getRequestMap();        String uri = (String) request.get(JAVASCRIPT_BASE_URI_PROPERTY);        if (uri != null) {            return uri;        }        StringAppender sa = new StringAppender(256);        sa.append(ext.getRequestContextPath());        sa.append(servletURI);        if (repositoryVersion != null && repositoryVersion.length() > 0) {            sa.append('/');            sa.append(repositoryVersion);        }        uri = sa.toString();        request.put(JAVASCRIPT_BASE_URI_PROPERTY, uri);        if (LOG.isInfoEnabled()) {            LOG.info("Set Javascript repository URL to '" + uri + "'.");        }        return uri;    }