Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-dev] Servlet 3.0 suspend / resume support

Andrew,

The standard API is not in jetty-7, but in jetty-8.
However the features are there and can be accessed via the
Continuation API.

Have a read of my recent blog entry at http://blogs.webtide.com/gregw
to see the difference.

I'll shortly be blogging about the continuation API, which will allow
the same async code to work on jetty-6, jetty-7, jetty-8 and any
servlet-3.0 container.

cheers



Andrew Lee wrote:
> Hi Guys -
> 
> I'm trying to use Jetty 7 (M2) to write an app that does comet. I want
> to use the Servlet 3.0 features that are supposedly in this version of
> Jetty. I can't find examples on how to do this anywhere though! Does
> someone have some example code sitting around? I've done enough poking
> through the code / docs, that I'm guessing the code should look
> something like this...
> 
> public void doGet(HttpServletRequest request, HttpServletResponse
> response) throws ServletException, IOException 
> 
> {
> 
> Request req = Request.getRequest(request);
> 
>         AsyncRequest aReq = req.getAsyncRequest();
> 
> 
> if(aReq.isInitial())
> 
> {
> 
> //do some stuff
> 
>         }
> 
> }
> 
> 
> The problem here is that Request.getRequest(request) throws a null
> pointer exception, and after looking through the code it looks like this
> is because HttpConnection.getCurrentConnection(); returns null. What am
> I doing wrong here? How can I get a reference to a Jetty Request object?
> 
> 
> Any help you can give me will be most appreciated! Thanks!
> 
> 
> -Andrew
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> jetty-dev mailing list
> jetty-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/jetty-dev



Back to the top