A servlet implements the behaviour of a mail server. One client sends a mail to another (who has an active session with mozilla navigator for example). How can the servlet notify to the user that have new mail:
- with a popup (how)
- changes in his home page (i.e. incoming(1))
Thanks
-
Notify new events to web client (4 messages)
- Posted by: Tim Prize
- Posted on: January 27 2004 06:42 EST
Threaded Messages (4)
- Notify new events to web client by Paul Strack on January 27 2004 08:05 EST
- More precision by Tim Prize on January 27 2004 08:23 EST
-
More precision by David Rabinowitz on January 27 2004 08:29 EST
- More precision by Paul Strack on January 27 2004 02:10 EST
-
More precision by David Rabinowitz on January 27 2004 08:29 EST
- More precision by Tim Prize on January 27 2004 08:23 EST
-
Notify new events to web client[ Go to top ]
- Posted by: Paul Strack
- Posted on: January 27 2004 08:05 EST
- in response to Tim Prize
Unless the target of the mail message is currently interacting with the server, there is no way to do this.
Otherwise, you can simply modify the logic for the main page of your web app to notify the user that they have new messages. Look at the way that online mail system like Yahoo Mail behave to get an idea of how to make things function. -
More precision[ Go to top ]
- Posted by: Tim Prize
- Posted on: January 27 2004 08:23 EST
- in response to Paul Strack
I suppose that the user is login (It is very possible that is navigator has the home user). The problem is: How the servlet sends to browser an event to refresh incoming mail and to open a new popup?
Perhaps inverse idea, a javascript function (or and applet, I don't like this idea) that perform a question to servlet every X seconds. This implies a new reload of all page only if has a new mail??.
(I'm using struts)
Thanks a lot -
More precision[ Go to top ]
- Posted by: David Rabinowitz
- Posted on: January 27 2004 08:29 EST
- in response to Tim Prize
You need to have a clinet side logic. As mention, it can be either JavaScript in a page that gets reloaded every few seconds or applet which communicates with the server.
I once implemented a JS solution. It worked, but looked weird (I used hidden frame, so every few seconds the browser would come to live). I'd reccomend using applet, especially when today you have thin SOAP clients you can use in applets.
David -
More precision[ Go to top ]
- Posted by: Paul Strack
- Posted on: January 27 2004 14:10 EST
- in response to David Rabinowitz
I agree with David.