How can I allow my Guice configuration to serve static files from the `root
("/")` context when this is my configuration:
**web.xml**
<context-param>
<param-name>resteasy.guice.modules</param-name>
<param-value>org.jboss.errai.ui.demo.server.MyModule</param-value>
</context-param>
<listener>
<listener-class>
org.jboss.resteasy.plugins.guice.GuiceResteasyBootstrapServletContextListener
</listener-class>
</listener>
<servlet>
<servlet-name>Resteasy</servlet-name>
<servlet-class>
org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher
</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>Resteasy</servlet-name>
<url-pattern>/*</url-pattern>
</servlet-mapping>
**Guice module:**
public class MyModule implements Module {
public void configure(final Binder binder) {
binder.bind(MyResource.class); // Jax-RS resource i.e. GET, PUT
etc...
}
}
The basic idea of I want to do is that keep my Resteasy configuration to be
able to serve Restful api from within the root context like *
http://localhost:8888/{userId}*
As well as be able to serve static contents like: *
http://localhost:8888/index.html* or like *http://localhost:8888/main.css *
etc.
Static files I need to serve include index.html and the like which are
stored in the *webapp* folder.
What should be reconfigured to my current configuration to fit this need?
--
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.