Sorry for bringing up this thread, but I'm still looking for advices.
Should I implement this or Wicket can do it for me?

Regards.

On Sun, Oct 31, 2010 at 2:11 PM, Mauro Ciancio <maurocian...@gmail.com> wrote:
> Hi Martin,
>
> I didn't explain myself very well. I'm using wicket resources, I
> inherited from WebResource and implemented the abstract methods.
>
> Also, I mounted the resources using the following code:
>
> String resourceKey = "photos";
> String alias = "photos"
>
> SharedResources sharedResources = application.getSharedResources();
> sharedResources.putClassAlias(MyWebResource.class, alias);
> sharedResources.add(MyWebResource.class, resourceKey, null, null, new
> MyWebResource());
> webApplication.mount(new
> IndexedSharedResourceCodingStrategy("/photos", alias + "/" +
> resourceKey));
>
> So, I get the pretty urls I wanted. My resources gets mounted at
> "domain.com/photos/my/parameters" and according to the parameters I
> serve differents photos.
>
> Once the photos are uploaded they never change, so I'd like the photos
> be cached. I'm expecting to get a 304 not modified, but the
> If-Modified-Since header is ignored because of the mount path is not
> under '/resources'.
>
> Is this clearer?
> Should I implement the checking for the header or it's supposed that
> wicket could do that for me?
>
> Thanks in advance.
> Regards.
>
> On Sun, Oct 31, 2010 at 6:15 AM, Martin Grigorov <mgrigo...@apache.org> wrote:
>> Hi Mauro,
>>
>> /resources is a special path managed by Wicket, e.g.
>> ResourceReference(MyComponent.class, "myImage.gif") will be reachable at
>> /resources/com.mypackage.MyComponent/myImage.gif
>>
>> Resources which are put in next to WEB-INF folder are not managed by WIcket
>> and they are served directly by the web container
>> Take a look at http://code.google.com/p/wro4j/
>>
>> On Sun, Oct 31, 2010 at 1:11 AM, Mauro Ciancio <maurocian...@gmail.com>wrote:
>>
>>> Hello everyone:
>>>
>>> I've been trying to get properly working the caching in my site's
>>> resources using the if-modified-since header. I've noticed that the
>>> check for the header is only done if the resource is mounted under the
>>> '/resources' url (wicket filter @ line 1130, Wicket 1.4).
>>>
>>> My resources are mounted under another url ('/photos'). I was
>>> wondering why the check is restricted to that url. Also, I've tried to
>>> mount my resources under /resources/photos but I get an exception that
>>> says 'cannot be mounted under /resources'.
>>>
>>> Any advices?
>>> Thanks in advance.
>>> --
>>> Mauro Ciancio
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>>
>>>
>>
>
>
>
> --
> Mauro Ciancio
>



-- 
Mauro Ciancio

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

Reply via email to