aspose file tools*
The moose likes Spring and the fly likes WebApplicationContext.getBean() is not giving bean object? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "WebApplicationContext.getBean() is not giving bean object?" Watch "WebApplicationContext.getBean() is not giving bean object?" New topic
Author

WebApplicationContext.getBean() is not giving bean object?

selva raja
Ranch Hand

Joined: Nov 24, 2009
Posts: 69
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: WebApplicationContext.getBean() is not giving bean object?