On Thursday 27 March 2008, Ian Roberts wrote:
> Vassilis Virvilis wrote:
> > Following the post
> >
> > http://www.nabble.com/Share-object-in-request-scope-on-ws-server-td14611572.html
> >
> > and upgrading cxf-2.0.4 with the spring libraries of 2.0.8 I was able to
> > make my service work serverside only.
> >
> > But If I try cxf-2.0.5 which has spring-2.0.8 I am getting again.
>
> http://static.springframework.org/spring/docs/2.0.x/reference/beans.html#beans-factory-scopes-other-web-configuration
>
> To make session scope work when you're not using Spring MVC you need to
> add a <listener> to your web.xml.
>
Oh I have, I just didn't mention it.
Somewhere I read that order of the
org.springframework.web.context.request.RequestContextListener
org.springframework.web.context.ContextLoaderListener
is important so I tried it both ways
<?xml version="1.0"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application
2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<display-name>Company WS</display-name>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:com/company/ws/impl/server-beans-simple.xml</param-value>
</context-param>
<listener>
<listener-class>
</listener-class>
</listener>
<listener>
<listener-class>
org.springframework.web.context.ContextLoaderListener
</listener-class>
</listener>
<servlet>
<servlet-name>CXFServlet</servlet-name>
<servlet-class>org.apache.cxf.transport.servlet.CXFServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>CXFServlet</servlet-name>
<url-pattern>/*</url-pattern>
</servlet-mapping>
</web-app>
.bill