4 Replies Latest reply on Nov 11, 2008 5:44 AM by janson12

    multiple reloads of rf-scripts

      Hi,
      i have a question regarding the loading strategy. the app i'm workin on is heavily based on richfaces which means that framework.pack.js and ui.pack.js are refered frequently. given that i tried the loading strategy paramter ALL, expecing that the scipts would load once at the very beginning only. however they are realoaded on almost every request (browser cache turned on). do misunderstand something fundamentally or should the two files not be reloaded?
      thanks for any enlightenment

        • 1. Re: multiple reloads of rf-scripts
          ilya_shaikovsky

          describe your environment please.. which app server you using?

          • 2. Re: multiple reloads of rf-scripts

            I'm using JBoss 4.2.1, Richfaces 3.2.1, JSF 1.2 reference impl. + tomahawk lib

            • 3. Re: multiple reloads of rf-scripts
              tkuprevich

               

              "Janson12" wrote:
              I'm using JBoss 4.2.1, Richfaces 3.2.1, JSF 1.2 reference impl. + tomahawk lib

              Hi Janson12!

              I have just tried environment you described except I'm using RichFaces 3.2.2.GA. Everything looks fine for me. Could you please send us your web.xml?

              Best Regards,
              Tsikhon Kuprevich

              • 4. Re: multiple reloads of rf-scripts

                hi Tsikhon,
                thanks a lot for caring! Two things that i've realized meanwhile:
                -the scripts where reloaded only when changing the view of an a4j:included page from within (through faces-navigation rules).
                -after having switched from ff2 to ff3 the scripts aren't reloaded more than once now! (though i still use the same browser settings).

                If you still consider doing further investigation here's the web.xml:

                <?xml version="1.0" encoding="UTF-8"?>
                <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                 xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
                 xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
                 id="WebApp_ID" version="2.5">
                 <display-name>WebAdmin</display-name>
                 <welcome-file-list>
                 <welcome-file>index.jsp</welcome-file>
                 <welcome-file>login.jsp</welcome-file>
                 </welcome-file-list>
                 <error-page>
                 <error-code>500</error-code>
                 <location>/error.jsp</location>
                 </error-page>
                 <error-page>
                 <error-code>401</error-code>
                 <location>/error.jsp</location>
                 </error-page>
                 <error-page>
                 <exception-type>java.lang.Exception</exception-type>
                 <location>/error.jsp</location>
                 </error-page>
                
                 <session-config>
                 <session-timeout>20</session-timeout>
                 </session-config>
                
                 <context-param>
                 <param-name>org.richfaces.SKIN</param-name>
                 <param-value>customSkin</param-value>
                 </context-param>
                 <filter>
                 <display-name>RichFaces Filter</display-name>
                 <filter-name>richfaces</filter-name>
                 <filter-class>org.ajax4jsf.Filter</filter-class>
                 <init-param>
                 <param-name>createTempFiles</param-name>
                 <param-value>false</param-value>
                 </init-param>
                 </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>
                 <context-param>
                 <param-name>org.richfaces.LoadStyleStrategy</param-name>
                 <param-value>ALL</param-value>
                 </context-param>
                 <context-param>
                 <param-name>org.richfaces.LoadScriptStrategy</param-name>
                 <param-value>ALL</param-value>
                 </context-param>
                 <context-param>
                 <param-name>com.sun.faces.validateXml</param-name>
                 <param-value>true</param-value>
                 </context-param>
                 <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>/faces/*</url-pattern>
                 </servlet-mapping>
                 <filter>
                 <filter-name>AuthFilter</filter-name>
                 <filter-class>
                 web.controller.AuthenticationFilter
                 </filter-class>
                 <init-param>
                 <param-name>enabled</param-name>
                 <param-value>true</param-value>
                 </init-param>
                 <init-param>
                 <param-name>redirectPage</param-name>
                 <param-value>/login.jsp</param-value>
                 </init-param>
                 </filter>
                 <filter-mapping>
                 <filter-name>AuthFilter</filter-name>
                 <url-pattern>/protected/*</url-pattern>
                 <dispatcher>REQUEST</dispatcher>
                 <dispatcher>FORWARD</dispatcher>
                 </filter-mapping>
                
                 <!-- Some ejb refs -->
                </web-app>


                again thanks,
                j