Hi,

I am having some trouble serving static content via the GuiceContainer. 
Here is my injector logic.

@Override
protected Injector getInjector() {
  return Guice.createInjector(new JerseyServletModule() {
    @Override
    protected void configureServlets() {
      install(new JpaPersistModule("my-persistence-unit"));
      filter("/*").through(PersistFilter.class);
      ApplicationConfiguration.bindResources(binder());
      bind(RestController.class);
      final Map<String, String> parameters = new HashMap<String, String>(); 
      parameters.put(ServletContainer.JSP_TEMPLATES_BASE_PATH, 
"/WEB-INF/jsp");
      // parameters.put(ServletContainer.FEATURE_FILTER_FORWARD_ON_404, 
"true");
      parameters.put(ServletContainer.PROPERTY_WEB_PAGE_CONTENT_REGEX, 
"/(js|css)/.*");
       filter("/*").through(GuiceContainer.class, parameters);
    }
  });
}

According to the documentation using the GuiceContainer as a filter should 
do the trick as long as I specify the PROPERTY_WEB_PAGE_CONTENT_REGEX. 
Unfortunately 
this does not work, I have also tried FEATURE_FILTER_FORWARD_ON_404 but it 
also doesn't give me any results.

All the resources are under:
/WEB-INF/js/*
/WEB-INF/css/*

The war file is properly build and when expanded through Tomcat 7.0.32 all 
is in place.

Any ideas?

Thank you.

-- 
You received this message because you are subscribed to the Google Groups 
"google-guice" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-guice/-/4qr_1BpNLZQJ.
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