Package com.sun.faces.config

Examples of com.sun.faces.config.WebConfiguration


        if (characterEncoding == null) {
            characterEncoding = RIConstants.CHAR_ENCODING;
        }

        if (isScriptHidingEnabled == null) {
            WebConfiguration webConfig =
                 WebConfiguration.getInstance(
                      context.getExternalContext());
            isScriptHidingEnabled = webConfig
                 .getBooleanContextInitParameter(
                      WebConfiguration.BooleanWebContextInitParameter.EnableJSStyleHiding);
        }

        return new HtmlResponseWriter(writer,
View Full Code Here


        // Save references to our context, request, and response
        this.servletContext = sc;
        this.request = request;       
        this.response = response;
        WebConfiguration config = WebConfiguration.getInstance(sc);
        if (config
              .getBooleanContextInitParameter(BooleanWebContextInitParameter.SendPoweredByHeader)) {
            ((HttpServletResponse) response)
                  .addHeader("X-Powered-By", "JSF/1.2");
        }
View Full Code Here

    // <editor-fold defaultstate="collapsed" desc="Constructors and instance accessors">

    /** Creates a new instance of ELFlash */
    private ELFlash() {
        flashInnerMap = new ConcurrentHashMap<String,Map<String, Object>>();
        WebConfiguration config = WebConfiguration.getInstance();
        String value;
        try {
            value = config.getOptionValue(WebContextInitParameter.NumberOfConcurrentFlashUsers);
            numberOfConcurentFlashUsers = Integer.parseInt(value);
        } catch (NumberFormatException nfe) {
      if (LOGGER.isLoggable(Level.WARNING)) {
    LOGGER.log(Level.WARNING, "Unable to set number of concurrent flash users.  Defaulting to {0}", numberOfConcurentFlashUsers);
      }

        }

        try {
            value = config.getOptionValue(WebContextInitParameter.NumberOfFlashesBetweenFlashReapings);
            numberOfFlashesBetweenFlashReapings = Long.parseLong(value);
        } catch (NumberFormatException nfe) {
      if (LOGGER.isLoggable(Level.WARNING)) {
    LOGGER.log(Level.WARNING, "Unable to set number flashes between flash repaings.  Defaulting to {0}", numberOfFlashesBetweenFlashReapings);
      }
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

    /**
     * Init <code>compressableTypes</code> from the configuration.
     */
    private void initCompressableTypes(Map<String, Object> appMap) {

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

    // <editor-fold defaultstate="collapsed" desc="Constructors and instance accessors">

    /** Creates a new instance of ELFlash */
    private ELFlash() {
        flashInnerMap = new ConcurrentHashMap<String,Map<String, Object>>();
        WebConfiguration config = WebConfiguration.getInstance();
        String value;
        try {
            value = config.getOptionValue(WebContextInitParameter.NumberOfConcurrentFlashUsers);
            numberOfConcurentFlashUsers = Integer.parseInt(value);
        } catch (NumberFormatException nfe) {
      if (LOGGER.isLoggable(Level.WARNING)) {
    LOGGER.log(Level.WARNING, "Unable to set number of concurrent flash users.  Defaulting to {0}", numberOfConcurentFlashUsers);
      }

        }

        try {
            value = config.getOptionValue(WebContextInitParameter.NumberOfFlashesBetweenFlashReapings);
            numberOfFlashesBetweenFlashReapings = Long.parseLong(value);
        } catch (NumberFormatException nfe) {
      if (LOGGER.isLoggable(Level.WARNING)) {
    LOGGER.log(Level.WARNING, "Unable to set number flashes between flash repaings.  Defaulting to {0}", numberOfFlashesBetweenFlashReapings);
      }
View Full Code Here

                                          Set<String> componentIds) {

        boolean uniquenessCheckDisabled = false;
       
        if (context.isProjectStage(ProjectStage.Production)) {
            WebConfiguration config = WebConfiguration.getInstance(context.getExternalContext());
            uniquenessCheckDisabled = config.isOptionEnabled(
                WebConfiguration.BooleanWebContextInitParameter.DisableIdUniquenessCheck);
        }
       
        if (!uniquenessCheckDisabled) {
       
View Full Code Here

    private StateHelper helper;

    public ResponseStateManagerImpl() {

        WebConfiguration webConfig = WebConfiguration.getInstance();
        String stateMode =
              webConfig.getOptionValue(StateSavingMethod);
        helper = ((StateManager.STATE_SAVING_METHOD_CLIENT.equals(stateMode)
                   ? new ClientSideStateHelper()
                   : new ServerSideStateHelper()));

    }
View Full Code Here

        // 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

    // <editor-fold defaultstate="collapsed" desc="Constructors and instance accessors">

    /** Creates a new instance of ELFlash */
    private ELFlash() {
        flashInnerMap = new ConcurrentHashMap<String,Map<String, Object>>();
        WebConfiguration config = WebConfiguration.getInstance();
        String value;
        try {
            value = config.getOptionValue(WebContextInitParameter.NumberOfConcurrentFlashUsers);
            numberOfConcurentFlashUsers = Integer.parseInt(value);
        } catch (NumberFormatException nfe) {
      if (LOGGER.isLoggable(Level.WARNING)) {
    LOGGER.log(Level.WARNING,
         "Unable to set number of concurrent flash users.  Defaulting to " +
                           numberOfConcurentFlashUsers);
      }

        }

        try {
            value = config.getOptionValue(WebContextInitParameter.NumberOfFlashesBetweenFlashReapings);
            numberOfFlashesBetweenFlashReapings = Long.parseLong(value);
        } catch (NumberFormatException nfe) {
      if (LOGGER.isLoggable(Level.WARNING)) {
    LOGGER.log(Level.WARNING,
         "Unable to set number flashes between flash repaings.  Defaulting to " +
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.