1 Reply Latest reply on Dec 23, 2009 4:38 AM by Ilya Shaikovsky

    Address images in xcss - Plug'n'Skin - Tomcat

    Frank Bitzer Newbie

      Hi there,

       

      I'm creating a new skin for my RichFaces app using plug'n'skin. In general, this is a great feature and works very well! However, I'm facing some strange problems including images (png files) on the Tomcat application server.

      Here is an example:

       

      In my XCSS file, I have

       

      <u:selector name=".rich-panel-header">
                <u:style name="background-image">
                     <f:resource f:key="de/jw/richfaces/modernstyle/images/panel_header.png" />
                </u:style>
      </u:selector>

       

      The file panel_header.png is located at resources/de/jw/richfaces/modernstyle/images/panel_header.png in the JAR file of the skin.

      So everything seems to be fine. And indeed, it works when I run an app with my skin on Jetty.

      However, when I run exactly the same app on Tomcat, it can not load my images. The exception is:

       

       

      22.12.2009 16:02:15 org.ajax4jsf.resource.InternetResourceService serviceResource
      SCHWERWIEGEND: Error on send resource
      org.ajax4jsf.cache.CacheException: Could not get Input stream for resource: de/jw/richfaces/modernstyle/images/panel_header.png
              at org.ajax4jsf.resource.InternetResourceService.load(InternetResourceService.java:337)
              at org.ajax4jsf.cache.LRUMapCache.load(LRUMapCache.java:116)
              at org.ajax4jsf.cache.LRUMapCache.get(LRUMapCache.java:87)
              at org.ajax4jsf.resource.InternetResourceService.serviceResource(InternetResourceService.java:195)
              at org.ajax4jsf.resource.InternetResourceService.serviceResource(InternetResourceService.java:141)
              at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:508)
              at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:56)
              at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
              at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
              at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
              at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
              at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
              at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
              at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
              at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
              at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
              at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
              at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
              at java.lang.Thread.run(Thread.java:619)
      Caused by: java.io.IOException: Could not get Input stream for resource: de/jw/richfaces/modernstyle/images/panel_header.png
              at org.ajax4jsf.resource.BaseResourceRenderer.send(BaseResourceRenderer.java:125)
              at org.ajax4jsf.resource.InternetResourceBase.send(InternetResourceBase.java:374)
              at org.ajax4jsf.resource.ResourceLifecycle.sendResource(ResourceLifecycle.java:219)
              at org.ajax4jsf.resource.ResourceLifecycle.send(ResourceLifecycle.java:158)
              at org.ajax4jsf.resource.InternetResourceService.load(InternetResourceService.java:335)
              ... 20 more

       

       

       

      Anyone has an idea?

      Is there another way to address these images?

       

      Thanks in advance

      Frank