dev@grizzly.java.net

Re: Sometimes a static content is not served

From: Jeanfrancois Arcand <Jeanfrancois.Arcand_at_Sun.COM>
Date: Thu, 02 Jul 2009 10:14:50 -0400

Salut,

Bongjae Chang wrote:
> Hi,
>
> I deploy the attached war with grizzly-http-servlet-deployer, sometimes
> static content is not served.
>
> Here is the script.
>
> >java -jar grizzly-http-servlet-deployer-1.9.17-SNAPSHOT.jar
> --port=8080 --application=./examples.war
>
> When I debugged the strange behavior, I could see some interesting result.
>
> I added the debug code to GrizzlyWebServer#updateGrizzlyAdapters()
> ---
> private void updateGrizzlyAdapters() {
> if( adapters.size() == 0 ) {
> ...
> } else {
> for(Entry<GrizzlyAdapter,String[]> entry: adapters.entrySet()) {
> System.out.println( "isHandleStaticResources()=" +
> entry.getKey().isHandleStaticResources() );
> ...
> }
> ...
> }
> }
> ---
>
> When the problem was reproduced, the following message is printed.
> ---
> isHandleStaticResources()=true
> isHandleStaticResources()=false
> ---
>
> When the problem was not reproduced, the following message is printed.
> ---
> isHandleStaticResources()=false
> isHandleStaticResources()=true
> ---
>
> I tested it, default two ServletAdapter was created.
>
> 1. handleStaticResources = false, servletPath = "", contextPath =
> "/examples"
> 2. handleStaticResources = true, servletPath = "/", contextPath =
> "/examples"
>
> And when I request "/examples/1k.jpg" with IE, above 2 should be served.
>
> But according to adapter's initialization, above 1 used to serve the
> request, then the problem is reproduced.
>
> When the war is deployed, default wrapper and context seem to be
> overwritten according to adapter's memory value's order.

Thanks. I've filled the issue:

https://grizzly.dev.java.net/issues/show_bug.cgi?id=693

A+

-- Jeanfrancois



>
> Thanks.
>
> --
> Bongjae Chang
>
>
>
>
> ------------------------------------------------------------------------
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_grizzly.dev.java.net
> For additional commands, e-mail: dev-help_at_grizzly.dev.java.net