5 Replies Latest reply on Apr 28, 2008 5:19 AM by jbuechel

    xcss not loaded after 3.1.4.GA -> 3.2.0.SR1

    jbuechel

      After trying to migrate from 3.1.4.GA to 3.2.0.SR1 all the xcss are not loaded anymore.

      I'm using seam 2.0.1.GA

      What I did:
      1. Replaced the 3 Richfaces jar files
      -> I've faced the issue
      2. Copied the web.xml from the docs (and made some minor changes at the beginning of the file).
      -> I've still faced the issue


      If i point my browser to:
      https://localhost/atiras-af-netz/a4j_3_2_0.SR1-SNAPSHOTorg/richfaces/renderkit/html/scripts/tooltip.js
      the content of the js-script is loaded.

      If i point my browser to:
      https://localhost/atiras-af-netz/a4j_3_2_0.SR1-SNAPSHOTcss/panel.xcss/DATB/eAHrvMB4AgAFYgIj
      or
      https://localhost/atiras-af-netz/a4j_3_2_0.SR1-SNAPSHOTorg/richfaces/renderkit/html/css/modalPanel.xcss/DATB/eAHrvMB4AgAFYgIj
      the content of the xcss file is NOT loaded.

      The web.xml:

      <?xml version="1.0" ?>
      <web-app xmlns="http://java.sun.com/xml/ns/j2ee"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
       version="2.4">
      
      
       <!--*********************************************
       FROX WEB COMPONENTS
       *********************************************-->
       <!-- FROX fwc resource resolver -->
       <context-param>
       <param-name>facelets.RESOURCE_RESOLVER</param-name>
       <param-value>com.frox.fwc.resource.FaceletsJarResolver</param-value>
       </context-param>
      
       <!--*********************************************
       FACELETS
       *********************************************-->
       <!-- Facelets comments: Content within comment brakets won't be rendered. This is not default behavior. -->
       <context-param>
       <param-name>facelets.SKIP_COMMENTS</param-name>
       <param-value>true</param-value>
       </context-param>
      
      
       <context-param>
       <param-name>org.ajax4jsf.VIEW_HANDLERS</param-name>
       <param-value>com.sun.facelets.FaceletViewHandler</param-value>
       </context-param>
      
       <!-- Seam -->
       <listener>
       <listener-class>org.jboss.seam.servlet.SeamListener</listener-class>
       </listener>
      
       <servlet>
       <servlet-name>Seam Resource Servlet</servlet-name>
       <servlet-class>org.jboss.seam.servlet.SeamResourceServlet</servlet-class>
       </servlet>
      
       <servlet-mapping>
       <servlet-name>Seam Resource Servlet</servlet-name>
       <url-pattern>/seam/resource/*</url-pattern>
       </servlet-mapping>
      
       <filter>
       <filter-name>Seam Filter</filter-name>
       <filter-class>org.jboss.seam.servlet.SeamFilter</filter-class>
       </filter>
      
       <filter-mapping>
       <filter-name>Seam Filter</filter-name>
       <url-pattern>/*</url-pattern>
       </filter-mapping>
      
       <!-- JSF -->
      
       <context-param>
       <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
       <param-value>.xhtml</param-value>
       </context-param>
      
       <context-param>
       <param-name>facelets.DEVELOPMENT</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>*.seam</url-pattern>
       </servlet-mapping>
      
      </web-app>
      


      Has somebody a hint what I'm doing wrong?



        • 1. Re: xcss not loaded after 3.1.4.GA -> 3.2.0.SR1
          jbuechel

          After some changes in the web.xml I redeployed the application again.

          If i point now my browser to:
          https://localhost/atiras-af-netz/a4j_3_2_0.SR1-SNAPSHOTcss/panel.xcss/DATB/eAHrvMB4AgAFYgIj
          the css content is displayed.

          but:
          The generated resource has now the following url:
          https://localhost/atiras-af-netz/a4j_3_2_0.SR1-SNAPSHOTcss/panel.xcss/DATB/eAGz-rAgBwAFaAI3
          and the css content is not displayed.

          A snippet of the generated html source:

          <html xmlns="http://www.w3.org/1999/xhtml">
          <head>
          <link rel="stylesheet" class="component" type="text/css" href="/atiras-af-netz/a4j_3_2_0.SR1-SNAPSHOTorg/richfaces/renderkit/html/css/basic_classes.xcss/DATB/eAGz-rAgBwAFaAI3"/>
          <link rel="stylesheet" class="component" type="text/css" href="/atiras-af-netz/a4j_3_2_0.SR1-SNAPSHOTorg/richfaces/renderkit/html/css/extended_classes.xcss/DATB/eAGz-rAgBwAFaAI3"/>
          <link rel="stylesheet" class="component" type="text/css" href="/atiras-af-netz/a4j_3_2_0.SR1-SNAPSHOTcss/panel.xcss/DATB/eAGz-rAgBwAFaAI3"/>
          <link rel="stylesheet" class="component" type="text/css" href="/atiras-af-netz/a4j_3_2_0.SR1-SNAPSHOTorg/richfaces/renderkit/html/css/tooltip.xcss/DATB/eAGz-rAgBwAFaAI3"/>
          <link rel="stylesheet" class="component" type="text/css" href="/atiras-af-netz/a4j_3_2_0.SR1-SNAPSHOTorg/richfaces/renderkit/html/css/modalPanel.xcss/DATB/eAGz-rAgBwAFaAI3"/>
          <link rel="stylesheet" class="user" type="text/css" href="/atiras-af-netz/a4j_3_2_0.SR1-SNAPSHOTcom/frox/fwc/view/common/css/fwc.xcss/DATB/eAGz-rAgBwAFaAI3"/>
          <link rel="stylesheet" class="user" type="text/css" href="/atiras-af-netz/a4j_3_2_0.SR1-SNAPSHOTcom/frox/fwc/view/themes/atirasAfNetz/css/theme.xcss/DATB/eAGz-rAgBwAFaAI3"/>
          <script type="text/javascript" src="/atiras-af-netz/a4j_3_2_0.SR1-SNAPSHOTorg.ajax4jsf.javascript.AjaxScript"/>
          <script type="text/javascript" src="/atiras-af-netz/a4j_3_2_0.SR1-SNAPSHOTorg/ajax4jsf/javascript/scripts/form.js"/>
          <script type="text/javascript" src="/atiras-af-netz/a4j_3_2_0.SR1-SNAPSHOTorg.ajax4jsf.javascript.PrototypeScript"/>
          <script type="text/javascript" src="/atiras-af-netz/a4j_3_2_0.SR1-SNAPSHOTorg/richfaces/renderkit/html/scripts/utils.js"/>
          <script type="text/javascript" src="/atiras-af-netz/a4j_3_2_0.SR1-SNAPSHOTorg/richfaces/renderkit/html/scripts/tooltip.js"/>
          <script type="text/javascript" src="/atiras-af-netz/a4j_3_2_0.SR1-SNAPSHOTorg/richfaces/renderkit/html/scripts/browser_info.js"/>
          <script type="text/javascript" src="/atiras-af-netz/a4j_3_2_0.SR1-SNAPSHOTorg/richfaces/renderkit/html/scripts/modalPanel.js"/>
          <script type="text/javascript" src="/atiras-af-netz/a4j_3_2_0.SR1-SNAPSHOTorg/richfaces/renderkit/html/scripts/modalPanelBorders.js"/>
          <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
          <title>....</title>
          


          • 2. Re: xcss not loaded after 3.1.4.GA -> 3.2.0.SR1
            nbelaevski

            What do you see when you point browser to https://localhost/atiras-af-netz/a4j_3_2_0.SR1-SNAPSHOTcss/panel.xcss/DATB/eAHrvMB4AgAFYgIj ? Are there any exceptions/log messages or just a blank page?

            • 3. Re: xcss not loaded after 3.1.4.GA -> 3.2.0.SR1
              jbuechel

              Thanks for taking time, Nick!

              Actually there is the css code displayed (would be correct, I think):

              .dr-pnl{border-width:1px;border-style:solid;padding:1px;}.dr-pnl-h{padding:2px;.....


              But:
              The corresponding link tag has been generated as html source like this:
              <link rel='stylesheet' class='component' type='text/css' href='/atiras-af-netz/a4j_3_2_0.SR1-SNAPSHOTcss/panel.xcss/DATB/eAGz-rAgBwAFaAI3' />


              The current web.xml:
              <?xml version="1.0" ?>
              <web-app xmlns="http://java.sun.com/xml/ns/j2ee"
               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
               xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
               version="2.4">
              
               <!--*********************************************
               DEBUG: Facelets development mode (disable in production)
               *********************************************-->
               <context-param>
               <param-name>facelets.DEVELOPMENT</param-name>
               <param-value>false</param-value>
               </context-param>
              
               <!--*********************************************
               FROX WEB COMPONENTS
               *********************************************-->
               <!-- FROX fwc resource resolver -->
               <context-param>
               <param-name>facelets.RESOURCE_RESOLVER</param-name>
               <param-value>com.frox.fwc.resource.FaceletsJarResolver</param-value>
               </context-param>
              
               <!--*********************************************
               FACELETS
               *********************************************-->
               <!-- Facelets comments: Content within comment brakets won't be rendered. This is not default behavior. -->
               <context-param>
               <param-name>facelets.SKIP_COMMENTS</param-name>
               <param-value>true</param-value>
               </context-param>
              
               <!--*********************************************
               AJAX4JSF
               *********************************************-->
               <context-param>
               <param-name>org.ajax4jsf.VIEW_HANDLERS</param-name>
               <param-value>com.sun.facelets.FaceletViewHandler</param-value>
               </context-param>
              
               <context-param>
               <param-name>org.ajax4jsf.SKIN</param-name>
               <param-value>com/frox/fwc/view/skins/fwcAtirasAfNetz</param-value>
               </context-param>
              
              <!--
               <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>
               <url-pattern>*.seam</url-pattern>
               </filter-mapping>
               -->
               <!--*********************************************
               JBOSS SEAM
               *********************************************-->
               <listener>
               <listener-class>org.jboss.seam.servlet.SeamListener</listener-class>
               </listener>
              
               <servlet>
               <servlet-name>Seam Resource Servlet</servlet-name>
               <servlet-class>org.jboss.seam.servlet.SeamResourceServlet</servlet-class>
               </servlet>
              
               <servlet-mapping>
               <servlet-name>Seam Resource Servlet</servlet-name>
               <url-pattern>/seam/resource/*</url-pattern>
               </servlet-mapping>
              
               <filter>
               <filter-name>Seam Filter</filter-name>
               <filter-class>org.jboss.seam.servlet.SeamFilter</filter-class>
               </filter>
              
               <filter-mapping>
               <filter-name>Seam Filter</filter-name>
               <url-pattern>/*</url-pattern>
               </filter-mapping>
              
               <!--*********************************************
               JSF
               *********************************************-->
               <context-param>
               <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
               <param-value>.xhtml</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>*.seam</url-pattern>
               </servlet-mapping>
              
               <!--*********************************************
               Error pages
               *********************************************-->
               <error-page>
               <error-code>404</error-code>
               <location>/error/http404.seam</location>
               </error-page>
              
               <!--*********************************************
               Security
               *********************************************-->
               <security-constraint>
               <display-name>Restrict raw XHTML Documents</display-name>
               <web-resource-collection>
               <web-resource-name>XHTML</web-resource-name>
               <url-pattern>*.xhtml</url-pattern>
               </web-resource-collection>
               <auth-constraint>
               <role-name>NONE</role-name>
               </auth-constraint>
               </security-constraint>
              
              </web-app>
              


              • 4. Re: xcss not loaded after 3.1.4.GA -> 3.2.0.SR1
                jbuechel

                Nick, do you have any hint for me?

                What generated key would be the correct one? eAHrvMB4AgAFYgIj or eAGz-rAgBwAFaAI3?

                It seems like they are depending on the configuration within the web.xml..

                • 5. Re: xcss not loaded after 3.1.4.GA -> 3.2.0.SR1
                  jbuechel

                  For those who are interested or struggling with this issue as well:

                  The problem was the login-required definition within the JBoss Seam page.xml:

                  I changed the following code:

                  <page view-id="/*" login-required="true">
                  

                  to this:
                  <page view-id="/modules/*" login-required="true">
                  


                  Related links:
                  http://jira.jboss.com/jira/browse/RF-2316
                  http://jira.jboss.com/jira/browse/JBSEAM-1009