Here is a first patch for the RevisionVersionProvider:

Index: 
src/main/java/org/wicketstuff/mergedresources/versioning/RevisionVersionProvider.java
===================================================================
--- 
src/main/java/org/wicketstuff/mergedresources/versioning/RevisionVersionProvider.java
       (revision
4147)
+++ 
src/main/java/org/wicketstuff/mergedresources/versioning/RevisionVersionProvider.java
       (working
copy)
@@ -15,7 +15,7 @@
        
        public int getVersion(final Class<?> scope, final String fileName)
throws VersionException {
                final String file = getResourcePath(scope, fileName);
-               final InputStream in = 
ClassLoader.getSystemResourceAsStream(file);
+               final InputStream in =
RevisionVersionProvider.class.getClassLoader().getResourceAsStream(file);
                if (in == null) {
                        throw new VersionException(scope, fileName, "can't find 
" + file);
                }


ClassLoader.getSystemResourceAsStream in my deployment enviroment, it
always returned null for classpath resources. Using the
RevisionVersionProvider classloader works fine.

Let me know where I should post further patches etc.

Jörn

On Fri, Aug 29, 2008 at 11:29 AM, Stefan Fußenegger
<[EMAIL PROTECTED]> wrote:
>
> Code is now available through wicketsuff:
> https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/wicketstuff-merged-resources/
> wicketstuff-merged-resources  and
> https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/wicketstuff-merged-resources-examples/
> wicketstuff-merged-resources-examples
>
> Now I want to make it available through
> http://wicketstuff.org/maven/repository/. I therefore registered at
> wicketstuff.org/teamcity (sfussenegger). What's next?
>
>
> Stefan Fußenegger wrote:
>>
>> I just finished the 4th and last entry of my series "Wicket Interface
>> Speed-Up" on my blog. To give a short summary: I investigated one of my
>> apps with YSlow and started optimizing it's interface rendering speed [1].
>> Especially Wicket's way of handling resources, i.e. JS and CSS files,
>> causes interfaces to load rather slowly. In my articles, I explain how to
>> modify the cache interval [2], how to mount resources with a version (e.g.
>> /css/all-1234.css) in order to use aggressive client-side caching (e.g.
>> resources expire after a year) [3]. Finally, I show how to merge resources
>> at application startup (using a class classed MergedResourceStream) to
>> reduce the number of resources a client has to download [4], including
>> code). I was able to increase interface loading times considerably, so
>> it's surely worth a look.
>>
>> I feel that it would also be worth to discuss, whether this work could be
>> part of upcoming Wicket versions. For the time being I'd like to make the
>> code attached to [4] a wicketstuff project - sfussenegger needs commit
>> access ;) - and wait for your feedback.
>>
>> The links:
>> [1]
>> http://talk-on-tech.blogspot.com/2008/08/wicket-interface-speed-up.html
>> Wicket Interface Speed-Up
>> [2]
>> http://talk-on-tech.blogspot.com/2008/08/wicket-interface-speed-up-modifying.html
>> Wicket Interface Speed-Up: Modifying Expires and Cache-Control Headers
>> [3]
>> http://talk-on-tech.blogspot.com/2008/08/wicket-interface-speed-up-caching.html
>> Wicket Interface Speed-Up: Caching Resources Forever
>> [4]
>> http://talk-on-tech.blogspot.com/2008/08/wicket-interface-speed-up-merging.html
>> Wicket Interface Speed-Up: Merging Resources for Fewer HTTP Requests
>>
>
>
> -----
> -------
> Stefan Fußenegger
> http://talk-on-tech.blogspot.com // looking for a nicer domain ;)
> --
> View this message in context: 
> http://www.nabble.com/Discussion-on-%22Wicket-Interface-Speed-Up%22-tp19197540p19216657.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

Reply via email to