[ 
https://issues.apache.org/jira/browse/CLK-564?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Bob Schellink updated CLK-564:
------------------------------

    Attachment: report_3.html
                report_2.html
                report_1.html

I've put together an Ant task to tackle this issue during build time.

The task deploys resources from a WEB-INF folder to a target web application 
folder. It will generate a report describing which resources were deployed and 
which resources are outdated and needs to be manually replaced or merged. 
Example usage:

    <target name="deploy" description="Deploy tests" depends="build">
        <taskdef name="deploy" 
classname="org.apache.click.tools.devtasks.DeployTask"
                        classpath="classpath"/>

        <deploy dir="src/war/WEB-INF" todir="src/war"/>
    </target>

I've attached a couple of the reports generated by this task:

report_1.html - on first run it deployed all resources
report_2.html - on second run nothing new was deployed and all resources was up 
to date
report_3.html - after changing some of the deployed resources, the third run 
prints the outdated resources

Could be a useful tool addition or part of extras. Not sure if this will work 
with maven though. Can maven invoke Ant tasks?

> Add ResourceService for serving static resources
> ------------------------------------------------
>
>                 Key: CLK-564
>                 URL: https://issues.apache.org/jira/browse/CLK-564
>             Project: Click
>          Issue Type: New Feature
>          Components: core
>    Affects Versions: 2.0.2
>            Reporter: Malcolm Edgar
>            Assignee: Malcolm Edgar
>             Fix For:  2.1.0 RC2
>
>         Attachments: report_1.html, report_2.html, report_3.html
>
>
> 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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to