Click
  1. Click
  2. CLK-665

Click Page Templates in class path (in addition to webRoot [sub- ]folders)

    Details

    • Type: Improvement Improvement
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 2.2.0, 2.1.0
    • Fix Version/s: None
    • Component/s: core
    • Labels:
      None

      Description

      I have a large web application composed from several independent modules packaged as separate .jar files in WEB-INF/lib.

      Now Click force me to copy all my .htm files (Page Templates) to 'main' module's webRoot folder (parent folder of WEB-INF), because Click look for templates only in webRoot folder and its subfolders (see XmlConfigService.getTemplateFiles), and then I have big htm midden in webRoot.

      I can't make reusable just-drop-in jar-module for somebody else.
      I have to make separate zip with htm templates with readme.txt with instructions where to copy them.

      Please! Add option to look Page templates in classpath too.

      See - http://static.springsource.org/spring/docs/2.0.x/reference/resources.html#resources-app-ctx-wildcards-in-resource-paths -
      how I use Spring for building these separate jar with separate spring's xmls into one application.

      See also excellent article about this modular concept:
      http://blogs.reucon.com/srt/2007/07/06/modular_spring_configuration.html

      I.e. Click could look in (for example) META-INF/ClickPageTemplates for Page mappings.
      Then both Velocity and Freemarker can load templates from classpath.

      PS: It looks like hand-made-OSGi.

      PPS: See also
      https://issues.apache.org/jira/browse/CLK-622 (~reversed situation: we have .htm, but don't have class).

        Activity

          People

          • Assignee:
            Unassigned
            Reporter:
            Andrew Fink
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:

              Development