The mapper maps a url path to a filesystem directory, so we can mount,
say, /static/* to a directory of static files anywhere on our server.  It
sets cache duration and MIME type properly along the way.
        
I¹m certainly open to better ways to accomplish this goal!


Boris

On 12/8/14, 5:07 PM, "Martin Grigorov" <mgrigo...@apache.org> wrote:

>Hi,
>
>What is the reason to go so low level with AbstractMapper and
>ResourceStreamRequestHandler
>?
>You can mount a ResourceReference with WebApplication#mountResource(), and
>this ResRef#getResource() should return IResource/AbstractResource where
>you have much better control on the response headers.
>
>
>Martin Grigorov
>Wicket Training and Consulting
>https://twitter.com/mtgrigorov
>
>On Mon, Dec 8, 2014 at 11:03 PM, Boris Goldowsky <bgoldow...@cast.org>
>wrote:
>
>> I have a request mapper that extends AbstractMapper, and returns a
>> ResourceStreamRequestHandler from mapRequest().
>>
>> The resource is being send with a Cache-Control: private header, which
>>is
>> unfortunate for caching in this case; we want the resources to be
>>publicly
>> cacheable.
>>
>> How can I set the cache scope properly in this scenario?   I see that
>> ResourceResponse has a setCacheScope() method, but my AbstractMapper
>> doesn¹t seem to get access to this anywhere.
>>
>> Thanks for any pointers!
>>
>> Bng
>>
>>


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

Reply via email to