Uploaded image for project: 'Click'
  1. Click
  2. CLK-564

Add ResourceService for serving static resources

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.1.0 RC1
    • 2.1.0
    • core
    • None

    Description

      The Click static resource deployment strategy of writing *.htm, *.css and image files to the web application /click/ directory does not work on all application servers. In particular WebLogic and WebSphere have security restrictions which prevent this from occuring. In these scenarios users are have to deploy these applications to the WAR file at build time. Google GAE also does not support this deployment mode.

      A solution to this problem is to use the ClickServlet to serve these resources. By adding an additional web.xml mapping:

      <servlet-mapping>
      <servlet-name>ClickServlet</servlet-name>
      <url-pattern>/click/*</url-pattern>
      </servlet-mapping>

      The ClickServlet could use a ResourceService interface obtained from the ConfigService which returns the resource data. A default ClickResourceService would be provided which loads all the resources at application initialization time. This service would scan all the JAR files for resources in META-INF/web as is currently done in XmlConfigService and would cache them in memory. The service would also scan all the resources under the WAR /click/ directory. These resources would override any defined in the application JAR files.

      This could be a good feature for 2.1.0, we should possibly delay the 2.1.0 RC release to include this feature.

      Attachments

        1. report_1.html
          33 kB
          Bob Schellink
        2. report_2.html
          4 kB
          Bob Schellink
        3. report_3.html
          6 kB
          Bob Schellink

        Activity

          People

            medgar Malcolm Edgar
            medgar Malcolm Edgar
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: