On Fri, Nov 19, 2010 at 5:34 AM, Philippe Beaudoin
<[email protected]> wrote:
> I ran into a similar problem before, which I solved by updating my
> deployment descriptor to serve these files as static. In my case I was
> using AppEngine and the process is described here:
>  http://code.google.com/appengine/docs/java/config/appconfig.html#Static_Files_and_Resource_Files

 In my case, I'm running the GWT Jetty server locally, but it's going
to be deployed to a different container (not sure which one yet). So
putting the configuration in guice-servlet would keep things cleaner.

> I would be surprised if you couldn't do the same thing with a regular
> Jetty or Tomcat server. But maybe there is a reason why you would like
> these files to go through a servlet?

No, not really - quite the opposite; I'd like it to just get served
as-is. If running through a servlet is the best way to do that, fine.
I'd rather configure in guice than in some config file somewhere, and
this seems like something guice could do.

No worries - everything works fine with the url prefix, I'm just
speculating about a possible better way to do it.

> Cheers,
>
>   Philippe
>
> On Fri, Nov 19, 2010 at 12:34 AM, Moandji Ezana <[email protected]> wrote:
>> You could do the opposite and first list the urls or folders that are served
>> by a StaticServlet that simply forwards to the resource, and fall back on /*
>> for everything else.
>>
>> Moandji
>>
>> --
>> www.moandjiezana.com
>>
>> Sent from my Android
>>
>> On 18 Nov 2010 10:45, "Kazimierz Pogoda" <[email protected]> wrote:
>>> You can pass everything /* through GuiceFilter in web.xml, and then in
>>> your ServletModule:
>>>
>>>
>>> serveRegex("^((?!^/index\\.html$|^/test\\.html$).)*$").with(MyServlet.class)
>>>
>>> It will pass every URI to your servlet, except /index.html and
>>> /test.html which will be served by servlet container's default
>>> servlet. Maybe this useful trick should be documented in ServletModule
>>> documentation? It could help a lot when defining request authorization
>>> with filterRegex, which I consider guice-servlets's unique feature.
>>>
>>> On Wed, Nov 17, 2010 at 10:46 PM, decitrig <[email protected]> wrote:
>>>> I could swear I saw something on serving static files through guice
>>>> servlet somewhere, but I can find it now, if it ever existed. Right
>>>> now I have guice servlet listening on /app/* urls, so that, for
>>>> example, /index.html won't go through the servlet. I would like to be
>>>> able to listen on /* and have /index.html served up statically (it's a
>>>> GWT host page). Any suggestions?
>>>>
>>>> --
>>>> You received this message because you are subscribed to the Google Groups
>>>> "google-guice" group.
>>>> To post to this group, send email to [email protected].
>>>> To unsubscribe from this group, send email to
>>>> [email protected].
>>>> For more options, visit this group at
>>>> http://groups.google.com/group/google-guice?hl=en.
>>>>
>>>>
>>>
>>>
>>>
>>> --
>>> "Meaning is differential not referential"
>>>
>>> kazik 'morisil' pogoda
>>> http://www.xemantic.com/ http://blog.xemantic.com/
>>>
>>> --
>>> You received this message because you are subscribed to the Google Groups
>>> "google-guice" group.
>>> To post to this group, send email to [email protected].
>>> To unsubscribe from this group, send email to
>>> [email protected].
>>> For more options, visit this group at
>>> http://groups.google.com/group/google-guice?hl=en.
>>>
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "google-guice" group.
>> To post to this group, send email to [email protected].
>> To unsubscribe from this group, send email to
>> [email protected].
>> For more options, visit this group at
>> http://groups.google.com/group/google-guice?hl=en.
>>
>
> --
> You received this message because you are subscribed to the Google Groups 
> "google-guice" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> For more options, visit this group at 
> http://groups.google.com/group/google-guice?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"google-guice" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-guice?hl=en.

Reply via email to