0 Replies Latest reply on Oct 11, 2007 4:33 AM by elm k

    Scripts and Styles aren`t inserted into head

    elm k Newbie

      Hi,

      i just started to use rich faces (together with tomahawk and myfaces..) and just at the start i ran into a problem.
      the richfaces filter is working but, i got no script and link tags in the header...
      the rendered html seems correct - but if there are no javascripts and styles ... it looks a little bit naked..
      ( libs: tomcat 5.5.23, myfaces 1.1.5, tomahawk 1.1.6 )

      the org.ajax4jsf debug looks like this:

      thanks in advance for any help!

      ......2007-10-11 10:09:07,134 [http-8080-Processor24] [pms2:2:admin] DEBUG org.ajax4jsf.context.AjaxContext - Scripts for insert into head :
      /pms/a4j_3_1_1-SNAPSHOTorg.ajax4jsf.javascript.AjaxScript.faces
      /pms/a4j_3_1_1-SNAPSHOTorg.ajax4jsf.javascript.PrototypeScript.faces
      /pms/a4j_3_1_1-SNAPSHOTscript/SliderScript.js.faces
      /pms/a4j_3_1_1-SNAPSHOTorg/richfaces/renderkit/html/scripts/browser_info.js.faces
      /pms/a4j_3_1_1-SNAPSHOTorg/richfaces/renderkit/html/scripts/events.js.faces
      
      2007-10-11 10:09:07,134 [http-8080-Processor24] [pms2:2:admin] DEBUG org.ajax4jsf.context.AjaxContext - Styles for insert into head :
      /pms/a4j_3_1_1-SNAPSHOTcss/slider.xcss/DATB/eAFjlbr0AAAC6gHS.faces;jsessionid=F9C16E8302F8D6BC13CDD12931BDBB82
      
      2007-10-11 10:09:07,134 [http-8080-Processor24] [pms2:2:admin] DEBUG org.ajax4jsf.event.AjaxPhaseListener - Process after phase RENDER_RESPONSE(6)
      2007-10-11 10:09:07,134 [http-8080-Processor24] [pms2:2:admin] DEBUG org.ajax4jsf.webapp.BaseXMLFilter - create HTML/XML parser for content type: text/xml;charset=UTF-8
      2007-10-11 10:09:07,134 [http-8080-Processor24] [pms2:2:admin] DEBUG org.ajax4jsf.webapp.BaseXMLFilter - Parser not have support for the such content type, send response as-is
      2007-10-11 10:09:07,134 [http-8080-Processor24] [pms2:2:admin] DEBUG org.ajax4jsf.webapp.BaseFilter - Finished request processing total time 581ms for uri: /pms/faces/user/start.faces
      2007-10-11 10:09:08,418 [http-8080-Processor23] [C7875CB425DC1514200B0752A03E99CB] DEBUG org.ajax4jsf.webapp.BaseFilter - Filter start request processing at 11.10.07 10:09 for uri: /pms/a4j_3_1_1-SNAPSHOTorg/richfaces/renderkit/html/images/spacer.gif.faces
      2007-10-11 10:09:08,418 [http-8080-Processor23] [C7875CB425DC1514200B0752A03E99CB] DEBUG org.ajax4jsf.resource.InternetResourceBuilder - Return instance of internet resource builder org.ajax4jsf.resource.ResourceBuilderImpl@476914
      2007-10-11 10:09:08,438 [http-8080-Processor23] [C7875CB425DC1514200B0752A03E99CB] DEBUG org.ajax4jsf.resource.InternetResourceBase - Set response http headers for Resource with key [org/richfaces/renderkit/html/images/spacer.gif]
      2007-10-11 10:09:09,079 [http-8080-Processor23] [C7875CB425DC1514200B0752A03E99CB] DEBUG org.ajax4jsf.resource.InternetResourceBase - Send content data for Resource with key [org/richfaces/renderkit/html/images/spacer.gif]
      2007-10-11 10:09:09,110 [http-8080-Processor23] [C7875CB425DC1514200B0752A03E99CB] DEBUG org.ajax4jsf.resource.InternetResourceService - Get content from cache for resource org/richfaces/renderkit/html/images/spacer.gif
      2007-10-11 10:09:09,110 [http-8080-Processor23] [C7875CB425DC1514200B0752A03E99CB] DEBUG org.ajax4jsf.webapp.BaseFilter - Finished request processing total time 692ms for uri: /pms/a4j_3_1_1-SNAPSHOTorg/richfaces/renderkit/html/images/spacer.gif.faces
      




      the web.xml filter configuration is like this:
      <context-param>
       <param-name>org.ajax4jsf.xmlparser.ORDER</param-name>
       <param-value>TIDY</param-value>
       </context-param>
       <context-param>
       <param-name>org.richfaces.SKIN</param-name>
       <param-value>blueSky</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>
       <servlet-name>Faces Servlet</servlet-name>
       <dispatcher>REQUEST</dispatcher>
       <dispatcher>FORWARD</dispatcher>
       <dispatcher>INCLUDE</dispatcher>
       </filter-mapping>
       <!-- see: http://myfaces.apache.org/tomahawk/extensionsFilter.html -->
       <filter>
       <filter-name>MyFacesExtensionsFilter</filter-name>
       <filter-class>org.apache.myfaces.webapp.filter.ExtensionsFilter</filter-class>
       <init-param>
       <description>Set the size limit for uploaded files.
       Format: 10 - 10 bytes
       10k - 10 KB
       10m - 10 MB
       1g - 1 GB
       </description>
       <param-name>maxFileSize</param-name>
       <param-value>20m</param-value>
       </init-param>
       </filter>
       <!-- extension mapping for adding <script/>, <link/>, and other resource tags to JSF-pages -->
       <filter-mapping>
       <filter-name>MyFacesExtensionsFilter</filter-name>
       <url-pattern>*.faces</url-pattern>
       </filter-mapping>
       <!-- extension mapping for serving page-independent resources (javascript, stylesheets, images, etc.) -->
       <filter-mapping>
       <filter-name>MyFacesExtensionsFilter</filter-name>
       <url-pattern>/faces/myFacesExtensionResource/*</url-pattern>
       </filter-mapping>