Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » Tomcat Users »

Re: Information Push

Christopher Schultz

2003-10-27

Replies:

Ralf,
> To be more specise, but I do not want to restrict your answer, I could also
> think of these variant. I JSP site is requested by a browser. Every few
> seconds, the Java bean is producing a new updated version of this output website.
> How would I do this?

If all you want is a fresh page after an interval, you can do what a lot
of sites do. Put this tag in the <head> section of the page you send:

<META HTTP-EQUIV="Refresh" CONTENT="SSS; URL=URL-to-this-document">

...where SSS is the number of seconds to wait before refreshing the
page, and URL-to-this-document is the URL that produces the document you
wish to update.

Other options are using something like a Java or flash applet to display
constaqntly updated bit of information. Of course, in order to get those
data, the applets will have to request information from a server
somewhere...

> However if somebody know a more generic appraoch, please let me know? Is
> there a kind of architecture which supports this kind of programming? I think
> the main problem is HTTP since HTTP was not designed for this way of
> information provision.

You're right; HTTP isn't supposed to do what you're asking. It's
supposed to be client-server in strictly one direction.

-chris


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@(protected)
For additional commands, e-mail: tomcat-user-help@(protected)



©2008 junlu.com - Jax Systems, LLC, U.S.A.