ICEfaces
  1. ICEfaces
  2. ICE-3252

com.icesoft.faces.compressResources false is still compressing script files

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Invalid
    • Affects Version/s: 1.7.1
    • Fix Version/s: 1.7.2
    • Component/s: Framework
    • Labels:
      None
    • Environment:
      Mac Leopard 10.5.4, JBoss 4.2.2 also in Linux Netweaver CE 7.1. Really any platform.
    • Workaround Exists:
      Yes
    • Workaround Description:
      Hide
      Sorry I don't have a diff. Change line 19 in ResourceServer.java to

              try {
                  if (configuration.getChild("compressResources").getValueAsBoolean(true)) {
                      dispatcher = new CompressingServer(pathDispatcher);
                  } else {
                      dispatcher = pathDispatcher;
                  }
              }
              catch (ConfigurationException ce)
              {
                  dispatcher = pathDispatcher;
              }
      Show
      Sorry I don't have a diff. Change line 19 in ResourceServer.java to         try {             if (configuration.getChild("compressResources").getValueAsBoolean(true)) {                 dispatcher = new CompressingServer(pathDispatcher);             } else {                 dispatcher = pathDispatcher;             }         }         catch (ConfigurationException ce)         {             dispatcher = pathDispatcher;         }

      Description

      Setting the com.icesoft.faces.compressResources context param to false is still compressing the script files. Line 19 in ResourceServer.java is always returning the default of true because the value it's looking for is always null. Here's a list of all the context attributes in my application :

       org.jboss.seam.web.redirectFilter
       org.jboss.seam.navigation.pages
       awardlevelHome.component
       org.jboss.seam.navigation.safeActions.component
       org.jboss.seam.faces.facesMessages.component
       org.jboss.seam.persistence.persistenceContexts.component
       authenticator.component
       org.jboss.seam.framework.currentDate.component
       org.jboss.seam.core.conversationListFactory.component
       org.jboss.seam.core.contexts.component
       org.jboss.seam.core.expressions
       org.jboss.seam.theme.themeSelector.component
       org.jboss.seam.ui.graphicImage.graphicImageResource.component
       org.jboss.seam.international.timeZoneSelector.component
       org.jboss.seam.web.loggingFilter
       org.jboss.seam.core.conversation.component
       org.jboss.seam.web.multipartFilter
       org.jboss.seam.pdf.documentStore.component
       org.jboss.seam.web.userPrincipal.component
       org.jboss.seam.framework.currentTime.component
       org.jboss.seam.mail.mailSession.component
       com.sun.faces.ApplicationImpl
       org.jboss.seam.core.init.component
       org.jboss.seam.ui.entityIdentifierStore.component
       org.jboss.seam.security.entityPermissionChecker.component
       org.jboss.seam.core.expressions.component
       org.jboss.seam.web.parameters.component
       org.jboss.seam.core.locale.component
       awardlevelList.component
       org.jboss.seam.debug.introspector.component
       org.jboss.seam.navigation.pages.component
       org.jboss.seam.ui.resource.safeStyleResources.component
       nominationCreate.component
       org.apache.jasper.runtime.JspApplicationContextImpl
       org.jboss.seam.ui.resource.styleResource.component
       timer.component
       org.jboss.seam.core.conversationPropagation.component
       org.jboss.seam.theme.themeFactory.component
       org.jboss.seam.security.configurationFactory.component
       org.jboss.seam.international.timeZone.component
       nominationHome.component
       org.jboss.seam.core.conversationEntries.component
       com.sun.faces.config.WebConfiguration
       org.jboss.seam.web.servletContexts.component
       org.jboss.seam.core.resourceLoader.component
       org.jboss.seam.core.pojoCache.component
       org.jboss.seam.core.events.component
       org.jboss.seam.faces.renderer.component
       nomination_pocEntityManagerFactory.component
       org.apache.AnnotationProcessor
       org.jboss.seam.core.interpolator.component
       org.jboss.seam.web.loggingFilter.component
       org.jboss.seam.persistence.persistenceProvider.component
       com.sun.faces.sunJsfJs
       org.jboss.seam.faces.dataModels.component
       org.jboss.seam.transaction.synchronizations.component
       org.jboss.seam.remoting.gwt.gwtToSeamAdapter.component
       org.jboss.seam.faces.httpError.component
       org.jboss.seam.faces.facesPage.component
       employeeHome.component
       approvalHome.component
       org.apache.catalina.WELCOME_FILES
       org.jboss.seam.core.manager.component
       org.jboss.seam.web.multipartFilter.component
       nominationList.component
       org.jboss.seam.faces.validation.component
       org.jboss.seam.core.conversationStackFactory.component
       org.jboss.seam.core.validators.component
       com.sun.faces.ApplicationAssociate
       org.jboss.seam.ui.graphicImage.graphicImageStore.component
       org.jboss.seam.core.init
       nomination_pocEntityManagerFactory
       renderManager.component
       approvalList.component
       org.jboss.seam.web.redirectFilter.component
       org.jboss.seam.security.identity.component
       org.jboss.seam.faces.facesContext.component
       org.jboss.seam.debug.hotDeployFilter.component
       securityRules.component
       org.jboss.seam.faces.switcher.component
       org.jboss.seam.transaction.transaction.component
       org.jboss.seam.ui.hibernateEntityLoader.component
       org.jboss.seam.debug.contexts.component
       org.jboss.seam.exception.exceptions.component
       org.jboss.seam.core.resourceBundle.component
       org.jboss.seam.security.facesSecurityEvents
       employeeList.component
       entityManager.component
       org.jboss.seam.properties
       org.jboss.seam.ui.facelet.faceletCompiler.component
       org.jboss.seam.graphicImage.image.component
       nominationSteps.component
       org.jboss.seam.captcha.captcha.component
       org.jboss.seam.framework.currentDatetime.component
       org.jboss.seam.international.messagesFactory.component
       org.jboss.seam.async.dispatcher.component
       org.jboss.seam.remoting.remoting.component
       org.jboss.seam.faces.redirect.component
       org.jboss.seam.debug.hotDeployFilter
       org.apache.catalina.jsp_classpath
       javax.servlet.context.tempdir
       org.jboss.seam.captcha.captchaImage.component
       org.jboss.seam.web.exceptionFilter.component
       org.jboss.seam.ui.resource.webResource.component
       org.jboss.seam.international.localeSelector.component
       org.jboss.seam.core.ConversationIdGenerator.component
       org.jboss.seam.ui.EntityConverter.component
       org.apache.catalina.resources
       org.jboss.seam.web.isUserInRole.component
       org.jboss.seam.web.exceptionFilter
       org.jboss.seam.web.session.component
       org.jboss.seam.security.facesSecurityEvents.component
       org.jboss.seam.ui.entityLoader.component
       org.jboss.seam.faces.uiComponent.component

      Here are all of the init params for my application:
       com.icesoft.faces.synchronousUpdate
       com.icesoft.faces.standardRequestScope
       com.icesoft.faces.concurrentDOMViews
       com.sun.faces.injectionProvider
       com.icesoft.faces.compressResources
       org.icesoft.examples.serverClock
       facelets.DEVELOPMENT
       com.icesoft.faces.actionURLSuffix
       javax.faces.DEFAULT_SUFFIX
       javax.faces.STATE_SAVING_METHOD
       com.icesoft.faces.doJSFStateManagement

      It's there in the initParams (like we all thought), but in the code it's looking for an attribute.

        Activity

        Jason Porter created issue -
        Ken Fyten made changes -
        Field Original Value New Value
        Fix Version/s 1.7.2 [ 10130 ]
        Assignee Priority P1
        Assignee Mircea Toma [ mircea.toma ]
        Hide
        Jason Porter added a comment -

        Mircea, feel free to contact me directly if you have any additional questions or if there's more information I can provide for you. Jennifer Yndestad has my contact information.

        Show
        Jason Porter added a comment - Mircea, feel free to contact me directly if you have any additional questions or if there's more information I can provide for you. Jennifer Yndestad has my contact information.
        Hide
        Mircea Toma added a comment -

        Hi Jason,

        Icefaces expects a context parameter named 'com.icesoft.faces.compressResources' not an init parameter. I tested the behavior successfully with the context parameter set tot true, false, and leaving it out completely.

        Show
        Mircea Toma added a comment - Hi Jason, Icefaces expects a context parameter named 'com.icesoft.faces.compressResources' not an init parameter. I tested the behavior successfully with the context parameter set tot true, false, and leaving it out completely.
        Mircea Toma made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Invalid [ 6 ]
        Hide
        Jason Porter added a comment -

        What did I do wrong then? And what explains the output I found with the debugging? Is there something wrong with this web.xml?

        Show
        Jason Porter added a comment - What did I do wrong then? And what explains the output I found with the debugging? Is there something wrong with this web.xml?
        Jason Porter made changes -
        Attachment web.xml [ 11098 ]
        Hide
        Mircea Toma added a comment -

        I believe JBoss is compressing the HTTP responses. See http://wiki.jboss.org/wiki/TomcatConnectors . Let me know bout your findings.

        Show
        Mircea Toma added a comment - I believe JBoss is compressing the HTTP responses. See http://wiki.jboss.org/wiki/TomcatConnectors . Let me know bout your findings.
        Hide
        Jason Porter added a comment -

        This originally came as a problem we were having with Netweaver, the JS that ICEfaces sent the browser was double zipped. I did some searching and found the context-param solution and put it in place, and it didn't help, still double zipped. I don't have a problem with JBoss (and the context-param still didn't look like it was working until I applied that little bit of code I posted as a workaround).

        I'm not sure why it's listed as an initParam (getInitParamNames()) and not an attribute like what the code is looking for. You can verify by getting a handle on the ServletContext and looking at what's returned by getAttribute("com.icesoft.faces.compressResources") – I got null and then I get the value when I do a getInitParam.

        Show
        Jason Porter added a comment - This originally came as a problem we were having with Netweaver, the JS that ICEfaces sent the browser was double zipped. I did some searching and found the context-param solution and put it in place, and it didn't help, still double zipped. I don't have a problem with JBoss (and the context-param still didn't look like it was working until I applied that little bit of code I posted as a workaround). I'm not sure why it's listed as an initParam (getInitParamNames()) and not an attribute like what the code is looking for. You can verify by getting a handle on the ServletContext and looking at what's returned by getAttribute("com.icesoft.faces.compressResources") – I got null and then I get the value when I do a getInitParam.
        Hide
        Jason Porter added a comment -

        According to the Tomcat information, if no compression is configured it is off by default. http://tomcat.apache.org/tomcat-5.5-doc/config/http.html

        Show
        Jason Porter added a comment - According to the Tomcat information, if no compression is configured it is off by default. http://tomcat.apache.org/tomcat-5.5-doc/config/http.html
        Hide
        Mircea Toma added a comment -

        Yes, ServletContext.getInitParam() is the method used to retrieve context parameters. Sorry for the confusion. Your workaround is changing the logic that's in place right now which enables compression when the parameter is missing. There must be something wrong with Netweaver. I'll download it and try to debug it.

        Show
        Mircea Toma added a comment - Yes, ServletContext.getInitParam() is the method used to retrieve context parameters. Sorry for the confusion. Your workaround is changing the logic that's in place right now which enables compression when the parameter is missing. There must be something wrong with Netweaver. I'll download it and try to debug it.
        Mircea Toma made changes -
        Resolution Invalid [ 6 ]
        Status Resolved [ 5 ] Reopened [ 4 ]
        Hide
        Jason Porter added a comment -

        Thanks for the help. I'm going back through my work that I did yesterday and things are working now Still trying to figure out what's going on. The version of Netweaver we're using is CE 7.1 SP03.

        Show
        Jason Porter added a comment - Thanks for the help. I'm going back through my work that I did yesterday and things are working now Still trying to figure out what's going on. The version of Netweaver we're using is CE 7.1 SP03.
        Hide
        Jason Porter added a comment -

        I may have figured it out. I need to verify what it was that I deployed, but it looks like I may have had a spelling error I'll verify and comment again.

        Show
        Jason Porter added a comment - I may have figured it out. I need to verify what it was that I deployed, but it looks like I may have had a spelling error I'll verify and comment again.
        Hide
        Jason Porter added a comment -

        Yep, I should be wearing the dunce hat today. I had icefaces instead of icesoft. My bad, sorry.

        Show
        Jason Porter added a comment - Yep, I should be wearing the dunce hat today. I had icefaces instead of icesoft. My bad, sorry.
        Hide
        Mircea Toma added a comment -

        No worries. I'll mark the issue as invalid.

        Show
        Mircea Toma added a comment - No worries. I'll mark the issue as invalid.
        Mircea Toma made changes -
        Status Reopened [ 4 ] Resolved [ 5 ]
        Resolution Invalid [ 6 ]
        Ken Fyten made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Assignee Priority P1
        Assignee Mircea Toma [ mircea.toma ]

          People

          • Assignee:
            Unassigned
            Reporter:
            Jason Porter
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: