Configuration in web.xml
<!-- Loading Spring Application Context in web application--><context-param>
<description>spring context</description>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/myApp-spring-web.xml</param-value>
or
<param-value>classpath:/applicationContext-web.xml</param-value>
</context-param>
<listener>
<description>fetch spring configuration file</description>
<listener-class>
org.springframework.web.context.ContextLoaderListener
</listener-class>
</listener>
Integration with JSF
Configuration in faces-config.xml
<application>
<!-- Enables injecting Spring beans as Faces managed properties -->
<el-resolver>org.springframework.web.jsf.el.SpringBeanFacesELResolver</el-resolver>
</application>
No comments:
Post a Comment