public boolean isValueReference() { return ContainerUtils.isValueReference(_value); }
/** * 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; }
/** * @see ContainerUtils#isRunningOnGoogleAppEngine(ServletContext) */ public static boolean isRunningOnGoogleAppEngine( ExternalContext externalContext) { if (runningOnGoogleAppEngine != null) { return runningOnGoogleAppEngine.booleanValue(); } else { String serverInfo = ExternalContextUtils.getServerInfo(externalContext); return isServerGoogleAppEngine(serverInfo); } }
protected FacesInitializer getFacesInitializer() { if (_facesInitializer == null) { if (ContainerUtils.isJsp21()) { _facesInitializer = new Jsp21FacesInitializer(); } else { _facesInitializer = new Jsp20FacesInitializer(); } } return _facesInitializer; }
protected FacesInitializer getFacesInitializer() { if (_facesInitializer == null) { if (ContainerUtils.isJsp21()) { _facesInitializer = new Jsp21FacesInitializer(); } else { _facesInitializer = new Jsp20FacesInitializer(); } } return _facesInitializer; }
public boolean isValueReference() { return ContainerUtils.isValueReference(_value); }
/** * 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; }
/** * Returns a FacesInitializer that fits for the current environment (JSP 2.0 or 2.1). * @param context * @return */ private static FacesInitializer _getDefaultFacesInitializer(ServletContext context) { // No MyfacesConfig available yet, we must read the parameter directly: String initParameter = context.getInitParameter(MyfacesConfig.INIT_PARAM_SUPPORT_JSP_AND_FACES_EL); if (Boolean.FALSE.toString().equals(initParameter)) { return new FaceletsInitilializer(); } else if (ContainerUtils.isJsp21(context)) { return new Jsp21FacesInitializer(); } else { return new Jsp20FacesInitializer(); } }
/** * @see ContainerUtils#isRunningOnGoogleAppEngine(ServletContext) */ public static boolean isRunningOnGoogleAppEngine( ExternalContext externalContext) { if (runningOnGoogleAppEngine != null) { return runningOnGoogleAppEngine.booleanValue(); } else { String serverInfo = ExternalContextUtils.getServerInfo(externalContext); return isServerGoogleAppEngine(serverInfo); } }
public boolean isValueReference() { return ContainerUtils.isValueReference(_value); }
/** * 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; }
/** * Returns a FacesInitializer that fits for the current environment (JSP 2.0 or 2.1). * @param context * @return */ private static FacesInitializer _getDefaultFacesInitializer(ServletContext context) { if (ContainerUtils.isJsp21(context)) { return new Jsp21FacesInitializer(); } else { return new Jsp20FacesInitializer(); } }
/** * @see ContainerUtils#isRunningOnGoogleAppEngine(ServletContext) */ public static boolean isRunningOnGoogleAppEngine( ExternalContext externalContext) { if (runningOnGoogleAppEngine != null) { return runningOnGoogleAppEngine.booleanValue(); } else { String serverInfo = ExternalContextUtils.getServerInfo(externalContext); return isServerGoogleAppEngine(serverInfo); } }
public boolean isValueReference() { return ContainerUtils.isValueReference(_value); }
if (ContainerUtils.isRunningOnGoogleAppEngine(context) && jarFilesToScanParam != null && jarFilesToScanParam.length() > 0)
/** * Returns a FacesInitializer that fits for the current environment (JSP 2.0 or 2.1). * @param context * @return */ private static FacesInitializer _getDefaultFacesInitializer(ServletContext context) { if (ContainerUtils.isJsp21(context)) { return new Jsp21FacesInitializer(); } else { return new Jsp20FacesInitializer(); } }
/**Returns true if running on Google App Engine (both production and development environment). * <p>If this method returns true, then * <ul> * <li>MyFaces is initialized as in JSP 2.0 or less environment.</li> * <li>Last modification check of faces config is not done during update.</li> * </ul> */ public static boolean isRunningOnGoogleAppEngine( ServletContext servletContext) { if (runningOnGoogleAppEngine != null) { return runningOnGoogleAppEngine.booleanValue(); } else { return isServerGoogleAppEngine(servletContext.getServerInfo()); } }
private void initializeList(FacesContext facesContext, ListEntries listEntries, List<? super Object> list) { Application application = facesContext.getApplication(); Class<?> valueClass = (listEntries.getValueClass() == null) ? String.class : ClassUtils.simpleJavaTypeToClass(listEntries.getValueClass()); ExpressionFactory expFactory = application.getExpressionFactory(); ELContext elContext = facesContext.getELContext(); for (Iterator<? extends ListEntry> iterator = listEntries.getListEntries(); iterator.hasNext();) { ListEntry entry = iterator.next(); if (entry.isNullValue()) { list.add(null); } else { Object value = entry.getValue(); if (ContainerUtils.isValueReference((String) value)) { ValueExpression valueExpression = expFactory.createValueExpression(elContext, (String) value, Object.class); value = valueExpression.getValue(elContext); } list.add(coerceToType(facesContext, value, valueClass)); } } }
if (ContainerUtils.isRunningOnGoogleAppEngine(_externalContext)) return; long refreshPeriod = (MyfacesConfig.getCurrentInstance(_externalContext).getConfigRefreshPeriod()) * 1000;
/**Returns true if running on Google App Engine (both production and development environment). * <p>If this method returns true, then * <ul> * <li>MyFaces is initialized as in JSP 2.0 or less environment.</li> * <li>Last modification check of faces config is not done during update.</li> * </ul> */ public static boolean isRunningOnGoogleAppEngine( ServletContext servletContext) { if (runningOnGoogleAppEngine != null) { return runningOnGoogleAppEngine.booleanValue(); } else { return isServerGoogleAppEngine(servletContext.getServerInfo()); } }