[ 
https://issues.apache.org/jira/browse/MFCOMMONS-33?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13052985#comment-13052985
 ] 

Leonardo Uribe commented on MFCOMMONS-33:
-----------------------------------------

Added GZIP compression to ExtendedResourceHandler and these params:

    /**
     * Enable or disable gzip compressions for resources served by this 
extended resource handler. By default is disabled (false).
     */
    @JSFWebConfigParam(defaultValue="false")
    public static final String INIT_PARAM_GZIP_RESOURCES_ENABLED = 
"org.apache.myfaces.commons.GZIP_RESOURCES_ENABLED";
    
    /**
     * Indicate the suffix used to recognize resources that should be 
compressed. By default is ".css .js".
     */
    @JSFWebConfigParam(defaultValue=".css, .js")
    public static final String INIT_PARAM_GZIP_RESOURCES_SUFFIX = 
"org.apache.myfaces.commons.GZIP_RESOURCES_SUFFIX";
    public static final String INIT_PARAM_GZIP_RESOURCES_EXTENSIONS_DEFAULT = 
".css .js";
    
    /**
     * Indicate if gzipped files are stored on a temporal directory to serve 
them later. By default is true. If this is
     * disable, the files are compressed when they are served. 
     */
    @JSFWebConfigParam(defaultValue="true")
    public static final String INIT_PARAM_CACHE_DISK_GZIP_RESOURCES = 
"org.apache.myfaces.commons.CACHE_DISK_GZIP_RESOURCES";

by default compression is set to false. It could be good to enable compression 
only on files bigger than some specified lenght, to allow finer tuning.

Next objective is work on the parser and the possible options that could be 
configured from that location. 

> Extended ResourceHandler implementation
> ---------------------------------------
>
>                 Key: MFCOMMONS-33
>                 URL: https://issues.apache.org/jira/browse/MFCOMMONS-33
>             Project: MyFaces Commons
>          Issue Type: Task
>          Components: myfaces-commons-resourcehandler
>            Reporter: Leonardo Uribe
>            Assignee: Leonardo Uribe
>
> myfaces-commons-resourcehandler module includes an "AdvancedResourceHandler" 
> with these objectives: 
> - relative paths between resources (css files referencing images without 
> using #resource['..']) 
> - caching resources in the client (disabled if ProjectStage == Development) 
> - GZIP compression and local cache in tmp dir (disabled if ProjectStage == 
> Development) 
> - i18n (supporting country code and language). 
> This requires more discussion and work to create a full solution. In order to 
> create a enhanced implementation, I have a proposal on this issue:
> - Replace AdvancedResourceHandler with ExtendedResourceHandler, which is a 
> more descriptive name, 
> - Use the same pattern from myfaces shared, because it is well tested.
> - Use a SAXParser to load files, since the proposed solution is java 1.6 
> specific, and compatibility with jdk 1.5 is required. 
> I'll commit the proposal, but keep the previous code so we can discuss over 
> there.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to