dev@grizzly.java.net

Re: Question/Asnwer : why GrizzyAdapterChain rootFolder is not the same as ServletAdapter?

From: Jeanfrancois Arcand <Jeanfrancois.Arcand_at_Sun.COM>
Date: Mon, 06 Apr 2009 09:47:17 -0400

Salut,

Survivant 00 wrote:
> One question. I'm doing this using GrizzlyWebServer
>
> I have a war that have 2 servlets.
>
> I set the rootFolder for theses 2 servletAdapter
>
> and
>
> sa.setHandleStaticResources(true);
>
> but when I trace the code..the GrizzlyChainAdapter is "."
>
> should I set the rootfolder for this one too ?
>
> I try that SelectorThread.setWebAppRootPath(rootFolder); but didn't
> work too. (and by the way.. when should I use this line ? )

do GrizzltAdapter.setRootFolder(...)


>
>
> I trace into the code I found that GWS.updateGrizzlyAdapters() update
> the rootfolder for GrizzlyChainAdapter..
>
> but the variable : webResourcesPath is set from the GWS constructor....
>
>
> if we add a method : setWebResourcesPath(String rootFolder)


But it needs to be per Application (per GrizzlyAdapter) IMO. So that's
why I think setRootFolder(0 will works better. What do you think?

A+

--Jeanfrancois



>
>
> will it fix my problem ?
>
>