users@grizzly.java.net

Re: StaticHttpHandler

From: Oleksiy Stashok <oleksiy.stashok_at_oracle.com>
Date: Wed, 07 Mar 2012 20:10:08 +0100

Yves,

we've fixed StaticHttpHandler [1], you can find the fix either on
Grizzly trunk or 2.2.x branch.

Thanks.

WBR,
Alexey.

[1] http://java.net/jira/browse/GRIZZLY-1214

On 03/06/2012 06:54 PM, Oleksiy Stashok wrote:
> Hi Yves,
>
> can you pls. try to use the attached version of StaticHttpHandler, if
> it works fine for you - can I ask you to file the issue and we'll
> include the fix into next Grizzly versions.
>
> Thanks.
>
> WBR,
> Alexey.
>
> PS: if you use Grizzly version 2.2.x - you'll see compilation error,
> so pls. change
> final NIOOutputStream outputStream = response.getOutputStream();
>
> to
>
> final NIOOutputStream outputStream =
> response.getNIOOutputStream();
>
>
> On 03/06/2012 05:24 PM, Yves Gaffinet wrote:
>> Dear all
>>
>> I'm new with the grizzly framework but I already realize some small
>> "helloworlds"
>>
>> But I have a problem with the StaticHttpHandler.
>>
>> When I try to serve some static files, I get this exception:
>> org.glassfish.grizzly.PendingWriteQueueLimitExceededException: Max
>> queued data limit exceeded: 32879>32768
>>
>> This is how i use the handler:
>>
>> server.getServerConfiguration().addHttpHandler(new
>> StaticHttpHandler("C:\\maps"), "/map");
>>
>> Thanks for your help
>>
>> Yves
>>
>