users@grizzly.java.net

Re: how handle static content with GrizzlyWebServer ?

From: Survivant 00 <survivant00_at_gmail.com>
Date: Mon, 9 Feb 2009 18:37:58 -0500

it's not a 404.. it's the main page.. but without the static content.

#2 - there is no method in GWS for the static resources.. it's in the
ServletAdapter.

should I activate the static resource in each servlet ?

the question is more this :

servlet1 : servlet-mapping : *.jsp
servlet2 : servlet-mapping : *.xdf

but which one will handle *.gif, *.html, *.css ?


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

> Salut,
>
> Survivant 00 wrote:
>
>> I started Hudson with GrizzlyWebServer but when I access the root page, I
>> don,t see images or css.
>>
>
> The application is under /hudson. I guess we can improve the error page
> here, but I suspect you got a 404, which is expected.
>
>
>> I saw some examples where you put
>> ServerAdapter.setHandleStaticResources(true)..
>>
>> 2 Questions
>>
>> # 1 - but when you have multiples servlets how you do that ?
>>
>
> They all needs to be under their own path, e.g. you can invoke the
> following method to differentiate them:
>
>
> https://grizzly.dev.java.net/nonav/apidocs/com/sun/grizzly/tcp/StaticResourcesAdapter.html#setResourcesContextPath(java.lang.String)<https://grizzly.dev.java.net/nonav/apidocs/com/sun/grizzly/tcp/StaticResourcesAdapter.html#setResourcesContextPath%28java.lang.String%29>
>
>
>
>> # 2 - there is a way to set the handle on the GrizzyWebServer instead ?
>>
>
> Can you elaborate?
>
> Thanks
>
> -- Jeanfrancois
>
>
>
>
>>
>>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_grizzly.dev.java.net
> For additional commands, e-mail: users-help_at_grizzly.dev.java.net
>
>