Hi,
I ran the GrizzlyWebServer very simply in grizzly-http-1.9.16.
---
GrizzlyWebServer gws = new GrizzlyWebServer( port, webResourcesPath );
try {
gws.start();
} catch( IOException e ) {
...
}
---
I didn't add any grizzly adapters in order to just test a static resource simply.
But I found that it was not possible because of grizzly issue #614(
https://grizzly.dev.java.net/issues/show_bug.cgi?id=614, "should be able to force adapterChains.setHandleStaticResources to false", rev.3216 ).
See the current GrizzlyWebServer#updateGrizzlyAdapters().
---
private void updateGrizzlyAdapters() {
adapterChains = new GrizzlyAdapterChain();
if( adapters.size() == 0 ) {
adapterChains.setRootFolder(webResourcesPath);
adapterChains.setHandleStaticResources(false); // is it right?
grizzlyListener.setAdapter(adapterChains);
} else {
...
}
}
---
Maybe original above code is "adapterChains.setHandleStaticResources(true)" before rev.3216 if GWS doesn't have any adapters.
Also, I think that Sebatien Dionne's proposed patch was "adapterChains.setHandleStaticResources(true)" if GWS had no adapers in issue #614.
So, is it on purpose? And has the default policy for servicing a static resource without adapters been changed?
I would like to know your opinions.
Thanks.
--
Bongjae Chang