| Author |
WebApplicationContext.getBean() is not giving bean object?
|
selva raja
Ranch Hand
Joined: Nov 24, 2009
Posts: 67
|
|
Hi all,
I am trying to access bean that defined in context-servlet.xml file and this file is configured in web.xml as
<servlet>
<description>context servlet</description>
<display-name>context</display-name>
<servlet-name>context</servlet-name>
<servlet-class> org.springframework.web.servlet.DispatcherServlet
</servlet-class>
<init-param>
<param-name>contextConfigLocation</paramname>
<param-value>/WEB-INF/context-servlet.xml</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
i am using Spring-Version: 2.0.6
once i access bean using below line of code
WebApplicationContextUtils.getWebApplicationContex t(request.getSession().getServletContext()).getBea n("bean name") it returns null....
Thanks,
SR
|
 |
 |
|
|
subject: WebApplicationContext.getBean() is not giving bean object?
|
|
|