users@jersey.java.net

Re: [Jersey] Implicit MVC and Jersey Spring Integration

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Mon, 26 Jan 2009 11:36:15 +0100

Hi Richard,

It should work fine. I modified the bookstore sample to use Spring and
it worked OK. I have attached the maven project so you may try that
and see if it works for you.

This works for 1.0.2-SNAPSHOT (as in the attached project) and 1.0.1
(with the version in the project modified).

I suspect there is something wrong with your web.xml or you are using
an older version of Jersey older than 1.0.1. What version are you using?

Paul.



On Jan 26, 2009, at 9:43 AM, Richard Hancock wrote:

> Hi Guys,
>
> I was planning to use Jersey implicit MVC with Spring, including
> Spring Security, but am not sure to the best way to do
> this.configure implicit MVC to work with Jersey Spring Integration?
>
> The implicit MVC works fine when configured with the Jersey Web
> Application Servlet but when I try to use the Jersey Spring
> Integration Servlet the implicit MVC stops working.
>
> <servlet>
> <servlet-name>Jersey Web Application</servlet-name>
> <servlet-
> class>com.sun.jersey.spi.container.servlet.ServletContainer</servlet-
> class>
> ...
> <init-param>
> <param-
> name>com.sun.jersey.config.feature.ImplicitViewables</param-name>
> <param-value>true</param-value>
> </init-param>
> ...
> </servlet>
>
>
> <servlet>
> <servlet-name>Jersey Spring Integration</servlet-name>
> <servlet-class>
>
> com.sun.jersey.spi.spring.container.servlet.SpringServlet</servlet-
> class>
> ...
> </servlet>
>
> What is the best way to set up implicit MVC with Spring, and in
> particular with Spring Security?
>
> Cheers,
>
> Richard.
>
>
> Twice the fun— Share photos while you chat with Windows Live
> Messenger.