0 Replies Latest reply on Dec 25, 2009 8:51 AM by santosh pradhan

    pjl compression filter, richfaces js files truncated

    santosh pradhan Newbie
      I use pjl compression filter (http://sourceforge.net/projects/pjl-comp-filter/) to compress server output. I was using richfaces 3.2.2 and everything was working fine, the filter nicely compresed everything including richfaces js and css.

      now recently upgraded to 3.3.2SR1 and the richfaces js seems to be truncated. I have set org.richfaces.LoadScriptStrategy to ALL, and two js files framework.pack.js and ui.pack.js are not intact.

      I have tried out various things to infer that the problem is not with the compression filter; i extracted framework.pack.js and served it through the filter and it was sent well. I replaced this js in richfaces-impl-3.2.2.jar and still it is served well.

      setting org.richfaces.LoadScriptStrategy to DEFAULT, the smaller js files are returned empty,(firebug reports 20-30 bytes)
      I believe this issue is present in 3.3.0 as well. This occurs only for script files, the css seems intact.

      I have verified this on Windows XP, JBoss 4.2.0 and RHEL 4, Weblogic 10.3TP with pjl filter v1.7 and v1.6.6

      here is a relevant snippet of my web.xml

          <context-param>
              <param-name>org.richfaces.LoadScriptStrategy</param-name>
              <param-value>ALL</param-value>
          </context-param>
          <context-param>
              <param-name>org.richfaces.LoadStyleStrategy</param-name>
              <param-value>ALL</param-value>
          </context-param>

          <filter>
              <filter-name>Compression</filter-name>
              <filter-class>
                  com.planetj.servlet.filter.compression.CompressingFilter</filter-class>
              <init-param>
                  <param-name>debug</param-name>
                  <param-value>true</param-value>
              </init-param>
             
              <!-- to exclude a4j resources from being compressed
              <init-param>
                  <param-name>excludePathPatterns</param-name>
                  <param-value> a4j/.*</param-value>
              </init-param>
              -->
             
              <init-param>
                  <param-name>jakartaCommonsLogger</param-name>
                  <param-value>planetJ</param-value>
              </init-param>
          </filter>

          <filter-mapping>
              <filter-name>Compression</filter-name>
              <url-pattern>/*</url-pattern>
          </filter-mapping>

          <!-- Rich faces filter -->
          <filter>
              <display-name>RichFaces Filter</display-name>
              <filter-name>richfaces</filter-name>
              <filter-class>org.ajax4jsf.Filter</filter-class>
          </filter>
          <filter-mapping>
              <filter-name>richfaces</filter-name>
              <servlet-name>Faces Servlet</servlet-name>
              <dispatcher>REQUEST</dispatcher>
              <dispatcher>FORWARD</dispatcher>
              <dispatcher>INCLUDE</dispatcher>
          </filter-mapping>



          <!-- Faces servlet -->
          <servlet>
              <servlet-name>Faces Servlet</servlet-name>
              <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
              <load-on-startup>1</load-on-startup>
          </servlet>
          <servlet-mapping>
              <servlet-name>Faces Servlet</servlet-name>
              <url-pattern>*.jsf</url-pattern>
          </servlet-mapping>