You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by "Serban.Balamaci" <th...@gmail.com> on 2011/08/02 16:46:03 UTC

Using IResourceCachingStrategy with context relative resources(non PackageResource)

Hello all,
I'm using Wicket 1.5RC5.1.

It seems that IResourceCachingStrategy can only be used on
PackageResource(in BasicResourceReferenceMapper
getCachingStrategy().decorateUrl() if reference instanceof
PackageResourceReference), is that right?

Could I obtain the benefits for resources that are under /webapp/js,
/webapp/css?

Because I want to use wro4j to compact js and css files and  write under js
and css at /webapp/wro, but also have the benefits of
FilenameWithVersionResourceCachingStrategy, so everytime the application is
redeployed I want the users to receive the new compacted .js and .css files.

Is there another approach? 

Thanks.

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Using-IResourceCachingStrategy-with-context-relative-resources-non-PackageResource-tp3712574p3712574.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Using IResourceCachingStrategy with context relative resources(non PackageResource)

Posted by Alex Objelean <al...@gmail.com>.
It should be possible to include dynamically all resources in the page
contained inside a servlet context folder (no need to know the exact name of
the resource).

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Using-IResourceCachingStrategy-with-context-relative-resources-non-PackageResource-tp3712574p3713807.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Using IResourceCachingStrategy with context relative resources(non PackageResource)

Posted by "Serban.Balamaci" <th...@gmail.com>.
Merci Alex,
I indeed use the maven plugin and didn't consider a NamingStrategy, but at
first look we would not be able to reference back the generated file in
Wicket, right?

But I think that context resources not only PackageResources should be
candidates for a ResourceCachingStrategy and not need a special filter to
handle this.

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Using-IResourceCachingStrategy-with-context-relative-resources-non-PackageResource-tp3712574p3713469.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Using IResourceCachingStrategy with context relative resources(non PackageResource)

Posted by Alex Objelean <al...@gmail.com>.
Serban, if you are using wro4j-maven-plugin, you can achieve the
FilenameWithVersionResourceCachingStrategy feature by providing the 
http://code.google.com/p/wro4j/wiki/OutputNamingStrategy Resource Naming
Strategy .

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Using-IResourceCachingStrategy-with-context-relative-resources-non-PackageResource-tp3712574p3713308.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Using IResourceCachingStrategy with context relative resources(non PackageResource)

Posted by Pedro Santos <pe...@gmail.com>.
Yes, it is there for package resources. Better would be write a
javax.servlet.Filter with the described logic.

On Tue, Aug 2, 2011 at 11:46 AM, Serban.Balamaci <th...@gmail.com> wrote:
> Hello all,
> I'm using Wicket 1.5RC5.1.
>
> It seems that IResourceCachingStrategy can only be used on
> PackageResource(in BasicResourceReferenceMapper
> getCachingStrategy().decorateUrl() if reference instanceof
> PackageResourceReference), is that right?
>
> Could I obtain the benefits for resources that are under /webapp/js,
> /webapp/css?
>
> Because I want to use wro4j to compact js and css files and  write under js
> and css at /webapp/wro, but also have the benefits of
> FilenameWithVersionResourceCachingStrategy, so everytime the application is
> redeployed I want the users to receive the new compacted .js and .css files.
>
> Is there another approach?
>
> Thanks.
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/Using-IResourceCachingStrategy-with-context-relative-resources-non-PackageResource-tp3712574p3712574.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>



-- 
Pedro Henrique Oliveira dos Santos

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org