I have a session state. The first idea of this was session servlets. So I bind my servlet this way
bind(Foo.class).in(ServletScopes.SESSION);
But I get an exception
javax.servlet.ServletException: Servlets must be connected as single. The key [type = Foo, annotation = [none]] was not bound in the Singleton scope.
So servlets can't have scope with ServletScopes? What is the correct way to work with session state (yes, of course, it is better to write state less than servlets / classes / applications)?
source
share