dev@grizzly.java.net

Re: Sometimes a static content is not served

From: Survivant 00 <survivant00_at_gmail.com>
Date: Thu, 2 Jul 2009 12:51:39 -0400

I will check that.

you could also try with the logging.properties level at FINEST.

Deployer will log all the ServletAdapter created.


I'll check that tonight.

2009/7/2 Jeanfrancois Arcand <Jeanfrancois.Arcand_at_sun.com>

> 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
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_grizzly.dev.java.net
> For additional commands, e-mail: dev-help_at_grizzly.dev.java.net
>
>