Hello,
I have a problem referencing beans between different files. My web.xml file is:
my applicationContext.xml file is:Code:<context-param> <param-name>contextConfigLocation</param-name> <param-value>/WEB-INF/applicationContext.xml</param-value> </context-param> <!-- Spring Context Loader --> <servlet> <servlet-name>context</servlet-name> <servlet-class>org.springframework.web.ContextLoaderServlet</servlet-class> <load-on-startup>1</load-on-startup> </servlet> <!-- Spring Dispatcher --> <servlet> <servlet-name>CultureApp</servlet-name> <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class> <load-on-startup>2</load-on-startup> </servlet>
and my CultureApp-servlet.xml file isCode:<beans> <!-- ========================= BUSINESS DEFINITIONS ========================= --> <bean id="bizData" class="ca.culture.business.CultureBusinessData"/> </beans>
My problem is that every time I start this with Tomcat 4, I get the error indicating that it cannot resolve [No bean named 'bizData' is defined]. How can beans defined in the application context be referenced in other context (.xml files) ???Code:<beans> <!-- Controller for the initial Culture.ca page --> <bean id="CultureAppController" class="ca.culture.spring.CultureAppController"> <property name="businessData"><ref bean="bizData"/></property> </bean> </beans>
Thanks


Reply With Quote