Well, Comet is a pretty broad term that includes what you want.
Although you can't keep a connection alive forever, unless you use the
hidden iframe technique from your wikipedia link, which is where the
vulnerability comes in.  At the moment, you can use Jetty
Continuations or Servlet 3 to achieve long polling through request
suspending.

Via continuations:
final Continuation continuation =
ContinuationSupport.getContinuation(request);
continuation.setTimeout(35000);
continuation.suspend(response);
//Do processing
continuation.resume();

See more at: 
http://download.eclipse.org/jetty/stable-7/apidocs/org/eclipse/jetty/continuation/Continuation.html

Servlet 3 has a similar API, you suspend and resume or complete the
request:
http://www.jarvana.com/jarvana/view/org/mortbay/jetty/servlet-api/3.0.pre1/servlet-api-3.0.pre1-javadoc.jar!/javax/servlet/ServletRequest.html

On Aug 15, 10:21 am, Gator Bait <vivsz...@gmail.com> wrote:
> Hi Kevin,
>
> Thanks for the reply.
>
> Didn't think Comet was a good choice because of issues regarding
> second level domains and cross-site scripting vulnerabilities:
>
> http://en.wikipedia.org/wiki/Comet_%28programming%29
>
> Not familiar with Websockets.
>
> What I want to do is this: have my servlet push data to my user
> interface widget reusing the HTTP connection.  Not sure what version
> of Jetty is used in GWT 2.3 (ultimate goal is to deploy on Tomcat 6,
> but, wanted to get something working in the hosted environment
> first).
>
> From your response, sounds like this is controlled from the servlet
> code and not Jetty.
> Will you point me to an example?
>
> Many thanks,
> Gator Bait
>
> On Aug 15, 8:22 am, Kevin Jordan <ke...@kjordan.net> wrote:
>
>
>
>
>
>
>
> > Are you referring to Comet and/or Websockets?  For both of those, it's
> > part of the servlet you're connecting to.  Websockets will require aJetty7 
> > version though.
>
> > On Aug 14, 7:45 pm, Gator Bait <vivsz...@gmail.com> wrote:
>
> > > Hi,
>
> > > I'm new to GWT.
>
> > > I'm using GWT 2.3 and the embeddedJettyserver instance(not sure what
> > > version ofJetty).
>
> > > Will someone point me to an example of howJettyshould be configured
> > > to support persistentHTTPconnections?  From my reading, don't think
> > > there is ajetty.xml file to configure.  ShouldJettybe set up from
> > > com.google.gwt.dev.shell.jetty.JettyLauncher class?  If so, could you
> > > provide an example?
>
> > > Thanks for your time!
>
> > > Gator Bait

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to