Win a copy of The Way of the Web Tester: A Beginner's Guide to Automating Tests this week in the Testing forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

WebApplicationContext.getBean() is not giving bean object?

selva raja
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
I am trying to access bean that defined in context-servlet.xml file and this file is configured in web.xml as
<description>context servlet</description>
<servlet-class> org.springframework.web.servlet.DispatcherServlet
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....

  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic