2 Replies Latest reply on Sep 16, 2009 5:39 AM by theute

    Porlet Skin Definition

    crajkumarbe

      Hi,

      Can you please give configuration steps to add a SKIN to the portlet and explain how it is being mapped to the portlet?

      I was not able to find how the invocation place for the SkinConfigScript groovy script file.

      "web\WEB-INF\conf\script\groovy\SkinConfigScript.groovy"

      And please explain the parameters used in the skin config script file while adding a skin.

      SkinService.addSkin(
      "web/BannerPortlet",
      "Default",
      "/web/skin/portal/webui/component/UIBannerPortlet/DefaultStylesheet.css",
      ServletContext
      ) ;



        • 1. Re: Porlet Skin Definition
          crajkumarbe

          I tired simulating the bannerportlet and ended up in this below given exception..

          I don't why my configured path is NOT used to invoke the CSS file.
          SkinServer class determins the file name as "DefaultStylesheet-lt.css" with "-lt" at the end of the filename.

          When I access the CSS file from the browser, i'm getting HTTP 404 error.
          http://localhost:8080/DeveloperPortlet/skin/portlet/DevBannerPortlet/DefaultStylesheet.css

          SkingConfigScript.groovy

          SkinService.addSkin(
          "DeveloperPortlet/DevBannerPortlet",
          "Default",
          "/DeveloperPortlet/skin/portlet/DevBannerPortlet/DefaultStylesheet.css",
          ServletContext
          ) ;

          CSS file location inside WebContent
          /skin/portlet/DevBannerPortlet/DefaultStylesheet.css

          StackTrace
          18:28:14,149 ERROR [portal:ResourceRequestFilter] Could not render css /DeveloperPortlet/skin/portlet/DevBannerPortlet/DefaultStylesheet-lt.css
          java.lang.NullPointerException
          at org.exoplatform.portal.skin.MainResourceResolver.resolve(MainResourceResolver.java:65)
          at org.exoplatform.portal.skin.SkinService.processCSS(SkinService.java:353)
          at org.exoplatform.portal.skin.SkinService.renderCSS(SkinService.java:301)
          at org.exoplatform.portal.application.ResourceRequestFilter.doFilter(ResourceRequestFilter.java:150)
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
          at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
          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:235)
          at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
          at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
          at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
          at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
          at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
          at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
          at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
          at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
          at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
          at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
          at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
          at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)
          at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)



          Please help me in resolving this issue..

          • 2. Re: Porlet Skin Definition
            theute

            First you should check why you get this 404.

            Make sure it's really packaged in your war (extract it), also make sure your war is names: DeveloperPortlet.war (without version number as it looks like you are using Maven and Maven tends to add the version number on artifacts names)