Hi All, I was wondering if anybody knows how to use the property
"com.sun.jersey.config.property.WebPageContentRegex" when using the Guice
integration? Right now I have a very basic web application running that is
basically shown at
https://jersey.dev.java.net/nonav/apidocs/1.1.2-ea/contribs/jersey-guice/com/sun/jersey/guice/spi/container/servlet/package-summary.html
however
when I try to integrate the WebPageContentRegex property I get a 404 error
when trying to view a css page at /css/test.css. Note that the page does
work when I use the regular Jersey filter info in the web.xml file instead
of the Guice version. Right now I am working with Jersey 1.0.3.1.
I am configuring Guice integration as shown below
(net.cknudsen.jerseyexample.WebConfig):
@Override
protected void configureServlets() {
// web resources
bind(GuiceResource.class);
Map<String, String> params = new HashMap<String, String>();
// --------
// the next three lines are things I have
tried to change, but they don't seem to matter.
//params.put("com.sun.jersey.config.feature.ImplicitViewables", "true");
//params.put("com.sun.jersey.config.feature.Redirect", "true");
//params.put("com.sun.jersey.config.property.packages",
"net.cknudsen.jerseyexample.web");
// --------
params.put("com.sun.jersey.config.property.WebPageContentRegex",
"/(images|css|jsp)/.*");
serve("/*").with(GuiceContainer.class, params);
}
});
In my web.xml file I have:
<web-app xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance"
xmlns="
http://java.sun.com/xml/ns/javaee" xmlns:web="
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
xsi:schemaLocation="
http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
id="WebApp_ID" version="2.5">
<listener>
<listener-class>net.cknudsen.jerseyexample.WebConfig</listener-class>
</listener>
<filter>
<filter-name>GuiceFilter</filter-name>
<filter-class>com.google.inject.servlet.GuiceFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>GuiceFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
</web-app>
I am trying to deploy to Glassfish v3 prelude and using java 6.
Does anybody know what I am doing wrong or the best place for me to look to
find a fix for this issue?
Thanks,
Charlie