To integrate JSF with Spring I have added these lines in web.xml
:
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/applicationContext.xml</param-value>
</context-param>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<listener>
<listener-class>org.springframework.web.context.request.RequestContextListener</listener-class>
</listener>
And I have added all the spring dependencies using Maven, but when I run the project I receive the following error messages:
java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener
java.lang.ClassNotFoundException: org.springframework.web.context.request.RequestContextListener
When I took a glance at the folder /WEB-INF/lib
I have found no JAR files, although dependencies are declared in the pom.xml
.
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>${spring.version}</version>
</dependency>
I think that the problem that the JAR's are not packaged with the draft. Do you have an idea how to fix it?