click-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Malcolm Edgar (JIRA)" <j...@apache.org>
Subject [jira] Commented: (CLK-564) Add ResourceService for serving static resources
Date Thu, 09 Jul 2009 12:21:14 GMT

    [ https://issues.apache.org/jira/browse/CLK-564?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12729223#action_12729223
] 

Malcolm Edgar commented on CLK-564:
-----------------------------------

Thanks for the review and feedback. 

I have implemented your suggested fix for the /click/error.htm and /click/not-found.htm resources
in the VelocityTemplateService. I have yet to do this for the FreemarkerTemplateService, but
logically very similar. 

I will think some about your other comments regarding resources. This could be handy having
a velocity template for dynamically rendering JS and CSS content. However this is a broader
issue than the current problem with deployment onto WebLogic / WebSphere 

Regarding build time, yes that is the current solution for WebLogic / WebSphere but it gives
people a pretty bad initial experience until they figure it out. We could provide an Ant task
to do what you described. 

> 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.1.0
>            Reporter: Malcolm Edgar
>
> 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.


Mime
View raw message