Since web.xml has following definition which doesn't include
/WEB-INF/action-servlet.xml, for controllers like SignupController which
extends from SimpleFormController I can't get any beans defined from
applicationContext-*.xml in controller class IF there is NO property
reference to beans of applicationContext-*.xml from any beans defined in
action-servlet.xml. I used getApplicationContext().getBeanDefinitionNames()
in controller to verify that only beans from action-servlet.xml are
available.
-- web.xml --
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/applicationContext-*.xml,/WEB-INF/security.xml</param-value>
</context-param>
applicationContext-*.xml and action-servlet.xml are defined in different
contexts as you can tell from following(I implements ApplicationContextAware
in manager to have context to try to get beans defined in action-servlet.xml
but failed to achieve it), my question is how I can get reference to beans
in applicationContext-*.xml in controller class if I don't have any related
property reference for beans of applicationContext-*.xml in
action-servlet.xml. Thanks!
-- printout for getApplicationContext() from controller which is extended
from SimpleFormController --
org.springframework.web.context.support.XmlWebAppl icationContext: display
name [WebApplicationContext for namespace 'action-servlet']; startup date
[Wed Jul 18 09:08:48 CDT 2007]; child of
[org.springframework.web.context.support.XmlWebAppl icationContext: display
name [Root WebApplicationContext]; startup date [Wed Jul 18 09:08:33 CDT
2007]; root of context hierarchy; config locations
[/WEB-INF/applicationContext-*.xml,/WEB-INF/security.xml]]; config locations
[/WEB-INF/action-servlet.xml]
-- printout for getApplicationContext() from manager implements
ApplicationContextAware --
org.springframework.web.context.support.XmlWebAppl icationContext: display
name [Root WebApplicationContext]; startup date [Wed Jul 18 09:08:33 CDT
2007]; root of context hierarchy; config locations
[/WEB-INF/applicationContext-*.xml,/WEB-INF/security.xml]
--
View this message in context:
http://www.nabble.com/Cannot-have-beans-from-other-context-in-controller-in-1.9.4-MVC-tf4112517s2369.html#a11693798
Sent from the AppFuse - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]