Hi, I've seen some of you post a question much like this one, and I've seen the answers but I still can't figure it out.
I have an ejb-jar archive that loads an application context. I have some session bean that interact with daos, all managed by spring. I also have some business delegates that talk to session beans (facades).
That context is an applicationContext.xml located in WEB-INF jar folder.
And I have a struts web application, that will perform its task by calling the business delegates.
The problem is that when I reference the business delegates from the web tier application context, spring says it can't resolve the reference.
This is my configuration:
action-servlet.xml
These are some things in struts-config.xml:Code:<beans> <bean name="/totem/doSomething" class="com.genesis.DoSomethingAction" singleton="false"> <property name="doSmthBD"> <ref bean="doSmthBDelegate" /> </property> </bean> </beans>In web.xml I load the listener without further reference to anything else:Code:<action attribute="doSmthForm" name="doSmthForm" path="/totem/doSomething" validate="false" scope="session" type="org.springframework.web.struts.DelegatingActionProxy"/> <plug-in className="org.springframework.web.struts.ContextLoaderPlugIn"> <set-property property="contextConfigLocation" value="/WEB-INF/action-servlet.xml" /> </plug-in>How do I reference applicationContext.xml from action-servlet.xml so spring glue them all?Code:<listener> <listener-class> org.springframework.web.context.ContextLoaderListener </listener-class> </listener>


Reply With Quote