dev@jersey.java.net

Re: _at_Context ServletConfig in Tomcat 6

From: Wolf, Timo <timowolf_at_siemens.com>
Date: Mon, 22 Nov 2010 13:24:54 +0100

Hi Paul,

thanks for the fast response. I am using a filter:

<filter>
<filter-name>Jersey Filter</filter-name>
<filter-class>com.sun.jersey.spi.container.servlet.ServletContainer</filter-class>
<init-param>
<param-name>com.sun.jersey.config.feature.Redirect</param-name>
<param-value>true</param-value>
</init-param>
<init-param>
<param-name>com.sun.jersey.config.feature.ImplicitViewables</param-name>
<param-value>true</param-value>
</init-param>
<init-param>
<param-name>javax.ws.rs.Application</param-name>
<param-value>com....Application</param-value>
</init-param>
<init-param>
<param-name>com.sun.jersey.config.property.WebPageContentRegex</param-name>
<param-value>(/images/.*|/oauth/.*|.+\.jsp|.+\.css)</param-value>
</init-param>
</filter>

Thanks Timo.

On 22.11.2010, at 13:19, Paul Sandoz wrote:

Hi Timo,

I just did a quick test with GlassFish and it works fine for me.

Are you deploying Jersey as a servlet or a filter?

Paul.

On Nov 22, 2010, at 12:43 PM, Wolf, Timo wrote:

Hi,
I am using jersey 1.4 and extend the Application class to provide a
Web-Application. To access the Servlet Configuration I am using a
@Context ServletConfig sc property. Everything works fine when
testing with com.sun.jersey.jersey-test-framework and grizzly web
server.

But when building the war file and deploying to Tomcat 6 I got the
following problem:

Nov 22, 2010 11:41:56 AM com.sun.jersey.spi.inject.Errors
processErrorMessages
SEVERE: The following errors and warnings have been detected with
resource and/or provider classes:
SEVERE: Missing dependency for field: javax.servlet.ServletConfig
com....Application.sc

Any ideas what might be wrong or missing in my maven dependency
configuration?

Thanks a lot!

Best, Timo