Package com.sun.faces.config

Examples of com.sun.faces.config.WebConfiguration


        // Save references to our context, request, and response
        this.servletContext = sc;
        this.request = request;       
        this.response = response;
        WebConfiguration config = WebConfiguration.getInstance(sc);
        if (config.isOptionEnabled(SendPoweredByHeader)) {
            ((HttpServletResponse) response).addHeader("X-Powered-By", "JSF/2.0");
        }
        fallbackContentTypeMap = new HashMap<String,String>(3, 1.0f);
        fallbackContentTypeMap.put("js", "text/javascript");
        fallbackContentTypeMap.put("css", "text/css");
View Full Code Here


    // ------------------------------------------------------------ Constructors


    public MultiViewHandler() {

        WebConfiguration config = WebConfiguration.getInstance();
             
        configuredExtensions = config.getOptionValue(WebConfiguration.WebContextInitParameter.DefaultSuffix, " ");
        extensionsSet = config.isSet(WebConfiguration.WebContextInitParameter.DefaultSuffix);
        vdlFactory = (ViewDeclarationLanguageFactory)
                FactoryFinder.getFactory(FactoryFinder.VIEW_DECLARATION_LANGUAGE_FACTORY);

    }
View Full Code Here

        }

        this.encoding = encoding;

        // init those configuration parameters not yet initialized
        WebConfiguration webConfig = null;
        if (isScriptHidingEnabled == null) {
            webConfig = getWebConfiguration(webConfig);
            isScriptHidingEnabled = (null == webConfig) ? BooleanWebContextInitParameter.EnableJSStyleHiding.getDefaultValue() :
                                webConfig.isOptionEnabled(
                                BooleanWebContextInitParameter.EnableJSStyleHiding);
        }

        if (isScriptInAttributeValueEnabled == null) {
            webConfig = getWebConfiguration(webConfig);
            isScriptInAttributeValueEnabled = (null == webConfig) ? BooleanWebContextInitParameter.EnableScriptInAttributeValue.getDefaultValue() :
                             webConfig.isOptionEnabled(
                             BooleanWebContextInitParameter.EnableScriptInAttributeValue);
        }

        if (disableUnicodeEscaping == null) {
            webConfig = getWebConfiguration(webConfig);
            disableUnicodeEscaping =
                    WebConfiguration.DisableUnicodeEscaping.getByValue(
                        (null == webConfig) ? WebConfiguration.WebContextInitParameter.DisableUnicodeEscaping.getDefaultValue() :
                                webConfig.getOptionValue(
                                 WebConfiguration.WebContextInitParameter.DisableUnicodeEscaping));
            if (disableUnicodeEscaping == null) {
                disableUnicodeEscaping = WebConfiguration.DisableUnicodeEscaping.False;
            }
        }
View Full Code Here

    // ------------------------------------------------------------ Constructors


    public WebappResourceHelper() {

        WebConfiguration webconfig = WebConfiguration.getInstance();
        cacheTimestamp = webconfig.isOptionEnabled(CacheResourceModificationTimestamp);

    }
View Full Code Here

    /**
     * Constructs a new ResourceCache.
     */
    public ResourceCache() {

        WebConfiguration config = WebConfiguration.getInstance();
        assert (config != null);
        ServletContext sc = config.getServletContext();
        long period = getCheckPeriod(config);
        checkPeriod = ((period != -1) ? period * 1000L * 60L : -1);
        resourceCache = new MultiKeyConcurrentHashMap<String,ResourceInfoCheckPeriodProxy>(30);
        if (LOGGER.isLoggable(Level.FINE)) {
            LOGGER.log(Level.FINE,
View Full Code Here

    // ------------------------------------------------------------ Constructors


    public ClasspathResourceHelper() {

        WebConfiguration webconfig = WebConfiguration.getInstance();
        cacheTimestamp = webconfig.isOptionEnabled(CacheResourceModificationTimestamp);
        enableMissingResourceLibraryDetection =
                webconfig.isOptionEnabled(EnableMissingResourceLibraryDetection);

    }
View Full Code Here

        return clazz;
       
    }
   
    private static boolean isDevModeEnabled() {
        WebConfiguration webconfig = WebConfiguration.getInstance();
        return (webconfig != null
                  && "Development".equals(webconfig.getOptionValue(WebContextInitParameter.JavaxFacesProjectStage)));
    }
View Full Code Here

    /**
     * Init <code>compressableTypes</code> from the configuration.
     */
    private void initCompressableTypes() {

        WebConfiguration config = WebConfiguration.getInstance();
        String value = config.getOptionValue(WebConfiguration.WebContextInitParameter.CompressableMimeTypes);
        if (value != null && value.length() > 0) {
            String[] values = Util.split(value, ",");
            if (values != null) {
                for (String s : values) {
                    String pattern = s.trim();
View Full Code Here

    public FaceletCacheFactoryImpl() {
    }

    @Override
    public FaceletCache getFaceletCache() {
        WebConfiguration webConfig = WebConfiguration.getInstance();
        String refreshPeriod = webConfig.getOptionValue(WebConfiguration.WebContextInitParameter.FaceletsDefaultRefreshPeriod);
        long period = Long.parseLong(refreshPeriod);
        FaceletCache<DefaultFacelet> result = new DefaultFaceletCache(period);
        return result;

    }
View Full Code Here

            byte[] b = new byte[128];
            if (is.read(b) > 0) {
                String r = new String(b, RIConstants.CHAR_ENCODING);
                Matcher m = XmlDeclaration.matcher(r);
                if (m.find()) {
                    WebConfiguration config = mngr.getWebConfiguration();
                    FaceletsConfiguration faceletsConfig = config.getFaceletsConfiguration();
                    boolean currentModeIsXhtml = faceletsConfig.isProcessCurrentDocumentAsFaceletsXhtml(mngr.getAlias());

                    // We want to write the XML declaration if and only if
                    // the file extension for the current file has a mapping
                    // with the value of XHTML
View Full Code Here

TOP

Related Classes of com.sun.faces.config.WebConfiguration

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.