Duke Martin wrote:

> Your idea will work, but how do I periodically refresh the page?  The page
> the user is viewing is generated by the servlet.
>
> Duke
>

There is a META REFRESH tag in HTML (you can put it in the <HEAD> section) that
tells the browser to wait for a specified number of seconds, then automatically
issue a request (in the current window) to a specified URL.  You can find the
syntax for it on one of the HTML help sites (like the one at
http://www.developer.com).

If you've ever visited a site where they say "this site has been moved to xxx
-- please update your bookmarks", and then you get forwarded automatically,
this is the trick they are using.  In your case, the difference would be you'd
be requesting the same page again -- so you could check for the existence of
new mail each time.

Instead of replacing the entire application page (which this approach will
normally do), you might also think about using a framed presentation, and have
a little frame with this refresh tag in it -- the only thing that goes in this
frame would be the most recent "new mail" status.  You would be refreshing a
special call to your servlet that only checked the status and returned a page
with the appropriate image, or whatever.

Craig

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to