Maybe try something like this:
serveRegex("^/(?:(?!(images|css|html)).)*$").with(GuiceContainer.class);
On Fri, Jan 25, 2013 at 5:26 PM, John Stark <[email protected]> wrote:
>
> I'm using google guice and I'd like to have all server requests (/*) flow
> to my servlet file *except* static content. If needed, I'm good with
> placing static content into a /static folder. I just need to pick up
> servlet requests to the root.
>
> Here is the code that works:
>
> //Holds @GET @POST, etc
> bind(MyTemplateResource1.class);
> bind(MyTemplateResource2.class);
> // this serves MyTemplateResource1..2... and any other servlet
> filesserve("/server/*").with(GuiceContainer.class);
> // this serves the static content
> serveRegex("/(images|css|html)/.*").with(GuiceContainer.class);
>
> However, if I take out /server my static content also gets routed to
> MyTemplateResource1,2. e.g.:
>
> serve("/*").with(GuiceContainer.class);
>
> What is the best way to allow all static content to flow freely while
> routing Servlet content to one or more Resource files even when the servlet
> url can start from the root?
>
> Thanks
>
>
>
> --
> 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].
> Visit this group at http://groups.google.com/group/google-guice?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>
--
Kazik Pogoda
http://www.xemantic.com/
--
You received this message because you are subscribed to the Google Groups
"google-guice" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-guice?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.