Guice: java.lang.IllegalStateException: No SessionHandler or SessionManager

One reason for this error would be that you should inject the session object directly, not via constructor:

So instead of:

public class Foo {

@Inject public Foo(HttpServletSession s) {
this.session = s  }

do this:

public class Foo{

@Inject Provider<HttpServletSession> session;


And it should work much better 🙂