Alen, Dhanji,

thanks for the answers. Provider<HttpServletSession> seems to work better (I had already @RequestScoped).

Cheers,
Marc.
--
Blog: http://mguillem.wordpress.com

Dhanji R. Prasanna wrote:
Also, sounds like a problem that the GWT team may be able to answer better.

Dhanji.

On Sat, Mar 6, 2010 at 9:02 PM, Alen Vrečko <[email protected] <mailto:[email protected]>> wrote:

    Make sure you are not using the HttpServletRequest out of scope. e.g.

    @Singleton
    public class Foo{

    @Inject HttpServletRequest request;

    }

    is a very bad idea. I'd recommend you use a provider

    @Singleton
    public class Foo{

    @Inject Provider<HttpServletSession> session;

    }

    Or go with @RequestScoped

    Cheers
    Alen

    On Mar 4, 5:07 pm, Marc Guillemot <[email protected]
    <mailto:[email protected]>> wrote:
     > Hi,
     >
     > I have some problems using HttpSession or HttpServletRequest
    injection
     > under Jetty in GWT dev mode (using Google Eclipse plugin).
     >
     > With HttpSession, a new session gets created which is not the
     > "standard" session for my client therefore I can't find the attribute
     > placed there by a servlet.
     >
     > If I use HttpServletRequest injection and call myself getSection() on
     > it, I get following exception:
     >
     > Caused by: java.lang.IllegalStateException: No SessionHandler or
     > SessionManager
     >         at org.mortbay.jetty.Request.getSession(Request.java:1115)
     >         at org.mortbay.jetty.Request.getSession(Request.java:1105)
     >         at myproj.server.MyService.myMethod(MyService.java:48)
     >         at
    myproj.server.RPCServiceImpl.doAction(RPCServiceImpl.java:186)
     >         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
    Method)
     >         at
     >
    sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
     > 39)
     >         at
     >
    
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
     > 25)
     >         at java.lang.reflect.Method.invoke(Method.java:597)
     >         at
     > com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:
     > 562)
     >
     > Is it a know problem with Jetty + GWT + Google Eclipse Plugin?
     >
     > Cheers,
     > Marc.

    --
    You received this message because you are subscribed to the Google
    Groups "google-guice" group.
    To post to this group, send email to [email protected]
    <mailto:[email protected]>.
    To unsubscribe from this group, send email to
    [email protected]
    <mailto:google-guice%[email protected]>.
    For more options, visit this group at
    http://groups.google.com/group/google-guice?hl=en.


--
You received this message because you are subscribed to the Google Groups "google-guice" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-guice?hl=en.

--
You received this message because you are subscribed to the Google Groups 
"google-guice" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-guice?hl=en.

Reply via email to