/** * Determines whether we're running in a Servlet 2.5/JSP 2.1 environment. * * @return <code>true</code> if we're running in a JSP 2.1 environment, * <code>false</code> otherwise */ public static boolean isJsp21(ServletContext context) { //if running on GAE, treat like it is JSP 2.0 if(isRunningOnGoogleAppEngine(context)) return false; try { // simply check if the class JspApplicationContext is available Class.forName("javax.servlet.jsp.JspApplicationContext"); return true; } catch (ClassNotFoundException ex) { ; // expected exception in a JSP 2.0 (or less) environment } return false; }
/** * Determines whether we're running in a Servlet 2.5/JSP 2.1 environment. * * @return <code>true</code> if we're running in a JSP 2.1 environment, * <code>false</code> otherwise */ public static boolean isJsp21(ServletContext context) { //if running on GAE, treat like it is JSP 2.0 if(isRunningOnGoogleAppEngine(context)) { return false; } try { // simply check if the class JspApplicationContext is available Class.forName("javax.servlet.jsp.JspApplicationContext"); return true; } catch (ClassNotFoundException ex) { // expected exception in a JSP 2.0 (or less) environment } return false; }
/** * Determines whether we're running in a Servlet 2.5/JSP 2.1 environment. * * @return <code>true</code> if we're running in a JSP 2.1 environment, * <code>false</code> otherwise */ public static boolean isJsp21(ServletContext context) { //if running on GAE, treat like it is JSP 2.0 if(isRunningOnGoogleAppEngine(context)) return false; try { // simply check if the class JspApplicationContext is available Class.forName("javax.servlet.jsp.JspApplicationContext"); return true; } catch (ClassNotFoundException ex) { ; // expected exception in a JSP 2.0 (or less) environment } return false; }
if (ContainerUtils.isRunningOnGoogleAppEngine(context) && jarFilesToScanParam != null && jarFilesToScanParam.length() > 0)
if (ContainerUtils.isRunningOnGoogleAppEngine(_externalContext)) return; long refreshPeriod = (MyfacesConfig.getCurrentInstance(_externalContext).getConfigRefreshPeriod()) * 1000;
if (ContainerUtils.isRunningOnGoogleAppEngine(context) && jarFilesToScanParam != null && jarFilesToScanParam.length() > 0)
@Override public Collection<URL> getFaceletTagLibConfigurationResources( ExternalContext context) throws IOException { List<URL> urlSet = new ArrayList<URL>(); String jarFilesToScanParam = MyfacesConfig.getCurrentInstance(context).getGaeJsfJarFiles(); jarFilesToScanParam = jarFilesToScanParam != null ? jarFilesToScanParam.trim() : null; if (ContainerUtils.isRunningOnGoogleAppEngine(context) && jarFilesToScanParam != null && jarFilesToScanParam.length() > 0) { Collection<URL> urlsGAE = GAEUtils.searchInWebLib( context, getClassLoader(), jarFilesToScanParam, META_INF_PREFIX, FACELET_TAGLIB_SUFFIX); if (urlsGAE != null) { urlSet.addAll(urlsGAE); } } else { //Scan files inside META-INF ending with .faces-config.xml URL[] urls = Classpath.search(getClassLoader(), META_INF_PREFIX, FACELET_TAGLIB_SUFFIX); Collections.addAll(urlSet, urls); } return urlSet; }
if (ContainerUtils.isRunningOnGoogleAppEngine(_externalContext)) return; long refreshPeriod = (MyfacesConfig.getCurrentInstance(_externalContext).getConfigRefreshPeriod()) * 1000;
if (ContainerUtils.isRunningOnGoogleAppEngine(_externalContext))
jarAnnotationFilesToScanParam = jarAnnotationFilesToScanParam != null ? jarAnnotationFilesToScanParam.trim() : null; if (ContainerUtils.isRunningOnGoogleAppEngine(ctx) && jarAnnotationFilesToScanParam != null && jarAnnotationFilesToScanParam.length() > 0)