I am trying to create a Spring bean in session scope:
<bean id="myClass" class="com.test.Myclass scope="session" />
When I try to get the class from ApplicationContext in a servlet filter, like this:
WebApplicationContext applicationContext = WebApplicationContextUtils.getWebApplicationContext(config.getServletContext());
Myclass obj = (Myclass)applicationContext.getBean("myClass");
I get the following error: java.lang.IllegalStateException: No Scope
registered for scope name 'session'
I don't have any issues if I define the scope as prototype
! How can I retrieve the session-scope spring bean from applicationContext ?