RE: Question about Notify all online user
Howdy, The HTML probably looks something like this: The DB ping servlet checks on the database and if there's a change, its output includes javascript to bring up a popup window. Yoav Shapira Millennium ChemInformatics >-Original Message- >From: engp0510 [mailto:[EMAIL PROTECTED] >Sent: Wednesday, August 13, 2003 12:39 PM >To: Tomcat Users List; [EMAIL PROTECTED] >Subject: Re: Question about Notify all online user > >Ben! >Wah! Great! Could you give me more information about your implementation? >I am not clear with iFrame. > >- Original Message - >From: "Ben Souther" <[EMAIL PROTECTED]> >To: "Tomcat Users List" <[EMAIL PROTECTED]> >Sent: Thursday, August 14, 2003 12:32 AM >Subject: Re: Question about Notify all online user > > >We're doing something like this with a hidden frame (an iFrame) that >refreshes >it self every n seconds (using the Meta refresh tag). The frame just points >to a servlet which queries the database for new messages. If there is a >new >message, the iframe uses javascript to fire off a pop up. message. > >You're other option would be to use an applet that maintains a statefull >connection to your server. A applet list would be a better place to discuss >that approach though. > > > > > > >On Wednesday 13 August 2003 12:07 pm, engp0510 wrote: >> Hi, all >> How to implement notifying all online user when the record in database >has >> been changed? I am using Servlet and JSP to build a small Supply-Chain >> system running on Tomcat with MySQL. >> >> Thanks >> Zhidao > >-- >Ben Souther >F.W. Davison & Company, Inc. > > > > > >- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] > > >- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Question about Notify all online user
Ben! Wah! Great! Could you give me more information about your implementation? I am not clear with iFrame. - Original Message - From: "Ben Souther" <[EMAIL PROTECTED]> To: "Tomcat Users List" <[EMAIL PROTECTED]> Sent: Thursday, August 14, 2003 12:32 AM Subject: Re: Question about Notify all online user We're doing something like this with a hidden frame (an iFrame) that refreshes it self every n seconds (using the Meta refresh tag). The frame just points to a servlet which queries the database for new messages. If there is a new message, the iframe uses javascript to fire off a pop up. message. You're other option would be to use an applet that maintains a statefull connection to your server. A applet list would be a better place to discuss that approach though. On Wednesday 13 August 2003 12:07 pm, engp0510 wrote: > Hi, all > How to implement notifying all online user when the record in database has > been changed? I am using Servlet and JSP to build a small Supply-Chain > system running on Tomcat with MySQL. > > Thanks > Zhidao -- Ben Souther F.W. Davison & Company, Inc. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Question about Notify all online user
I'm not at liberty to give out any code but the implementation is pretty straight forward. An iframe (inline frame) is just an HTML tag that allows you to embed one webpage into another. A Google search will get you many examples of it's implementation. The IFrame is in a div that has it's visibility set to hidden. The page in the iframe meta refresh tag that causes it to reload every n seconds. I think we have it set to 60 seconds. Every time the frame refreshes, the servlet queries the database for unread messages. If it finds any, it rewrites page and adds a javascript function which is triggered from the body onload event that fires off a popup window telling the user how many unread messages they have. In our database, we have two attributes for this feature; is_new and is_read. The proc sets the is_new value to false every time it runs so that the user doesn't have to deal with a popup window every time the page refreshes (unless a new message shows up, of course). is_read is pretty self explanatory. When users first log in they are shown a list of unread messages. In our case the popup window is actually a hidden div with gets set to visible when it needs to pop up. This works nicely for us because we can put links to the messages right in the popup window. It's best to keep treads on the list. That way someone else will be able to read the answer and possibly avoid asking the same question. Hope this helps -Ben On Wednesday 13 August 2003 12:39 pm, you wrote: > Ben! > Wah! Great! Could you give me more information about your implementation? > I am not clear with iFrame. > > - Original Message - > From: "Ben Souther" <[EMAIL PROTECTED]> > To: "Tomcat Users List" <[EMAIL PROTECTED]> > Sent: Thursday, August 14, 2003 12:32 AM > Subject: Re: Question about Notify all online user > > > We're doing something like this with a hidden frame (an iFrame) that > refreshes > it self every n seconds (using the Meta refresh tag). The frame just points > to a servlet which queries the database for new messages. If there is a > new message, the iframe uses javascript to fire off a pop up. message. > > You're other option would be to use an applet that maintains a statefull > connection to your server. A applet list would be a better place to discuss > that approach though. > > On Wednesday 13 August 2003 12:07 pm, engp0510 wrote: > > Hi, all > > How to implement notifying all online user when the record in database > > has been changed? I am using Servlet and JSP to build a small > > Supply-Chain system running on Tomcat with MySQL. > > > > Thanks > > Zhidao -- Ben Souther F.W. Davison & Company, Inc. -- Ben Souther F.W. Davison & Company, Inc. REGISTER NOW FOR THE SCORPEO USER CONFERENCE! September 18-19, 2003 in Boston/Brookline, MA Additional Training Sessions held September 17, 2003 More info >> http://www.fwdco.com/services/Uconf03/default.shtm - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Question about Notify all online user
Net send * message Wall message :) You could have a custom tag that gets data from the application context and another little servlet that populates the application context. Have the take set display a message and set a cookie if a cookie with the appropriate value isn't already set. This message could take the form of a popup. --Angus > -Original Message- > From: engp0510 [mailto:[EMAIL PROTECTED] > Sent: Wednesday, August 13, 2003 12:08 PM > To: [EMAIL PROTECTED] > Subject: Question about Notify all online user > > > Hi, all > How to implement notifying all online user when the record in > database has been changed? I am using Servlet and JSP to > build a small Supply-Chain system running on Tomcat with MySQL. > > Thanks > Zhidao > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Question about Notify all online user
We're doing something like this with a hidden frame (an iFrame) that refreshes it self every n seconds (using the Meta refresh tag). The frame just points to a servlet which queries the database for new messages. If there is a new message, the iframe uses javascript to fire off a pop up. message. You're other option would be to use an applet that maintains a statefull connection to your server. A applet list would be a better place to discuss that approach though. On Wednesday 13 August 2003 12:07 pm, engp0510 wrote: > Hi, all > How to implement notifying all online user when the record in database has > been changed? I am using Servlet and JSP to build a small Supply-Chain > system running on Tomcat with MySQL. > > Thanks > Zhidao -- Ben Souther F.W. Davison & Company, Inc. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Question about Notify all online user
Howdy, >How to implement notifying all online user when the record in database has >been changed? I am using Servlet and JSP to build a small Supply-Chain >system running on Tomcat with MySQL. Cool design question ;) You probably can't do it immediately on change, but on the next page the user loads after the change. Here's an approach: - Have a Filter mapped to all requests (url-pattern /*) that polls the DB or listens for the DB change event from another source. - Have a servlet that displays the contents of this change, let's call it ServletA - When the DB changes, the filter is notified and does the following: - Puts a "notified" attribute with value "false" in every incoming request - Gets a RequestDispatcher for ServletA and includes its contents in the response - Sets the "notified" attribute to value "true" after chain.doFilter, i.e. on the response's way back to the browser It's just an idea, doubtless others will have a different take ; Yoav Shapira This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Question about Notify all online user
That would work too. We're using an iframe for two reasons. 1). with an iframe, you don't need an addtional frameset page to deal with. 2). In our case the JSP in the IFrame is performing two duties. a.) It queries the database for new messages b.) It becomes the popup window that informs the user of the new messages. Unlike a js alert window, we can actually put links and message subject lines right in the popup window this way. It's also easier to call window.parent. from an iframe then comunicate between sibling frames. I like your filter idea. If we weren't already using frames for other reasons, I would go with a solution like that. It would be much cleaner than putting include tags at the top of every JSP. On Wednesday 13 August 2003 12:46 pm, Shapira, Yoav wrote: > Howdy, > The HTML probably looks something like this: > > > > > > The DB ping servlet checks on the database and if there's a change, its > output includes javascript to bring up a popup window. > > Yoav Shapira > Millennium ChemInformatics > > >-Original Message- > > From: engp0510 [mailto:[EMAIL PROTECTED] > > >Sent: Wednesday, August 13, 2003 12:39 PM > >To: Tomcat Users List; [EMAIL PROTECTED] > >Subject: Re: Question about Notify all online user > > > >Ben! > >Wah! Great! Could you give me more information about your > > implementation? > > >I am not clear with iFrame. > > > >- Original Message - > > From: "Ben Souther" <[EMAIL PROTECTED]> > > >To: "Tomcat Users List" <[EMAIL PROTECTED]> > >Sent: Thursday, August 14, 2003 12:32 AM > >Subject: Re: Question about Notify all online user > > > > > >We're doing something like this with a hidden frame (an iFrame) that > >refreshes > >it self every n seconds (using the Meta refresh tag). The frame just > > points > > >to a servlet which queries the database for new messages. If there is > > a > > >new > >message, the iframe uses javascript to fire off a pop up. message. > > > >You're other option would be to use an applet that maintains a > > statefull > > >connection to your server. A applet list would be a better place to > > discuss > > >that approach though. > > > >On Wednesday 13 August 2003 12:07 pm, engp0510 wrote: > >> Hi, all > >> How to implement notifying all online user when the record in > > database > > >has > > > >> been changed? I am using Servlet and JSP to build a small > > Supply-Chain > > >> system running on Tomcat with MySQL. > >> > >> Thanks > >> Zhidao > > > >-- > >Ben Souther > >F.W. Davison & Company, Inc. > > > > > > > > > > > >- > >To unsubscribe, e-mail: [EMAIL PROTECTED] > >For additional commands, e-mail: [EMAIL PROTECTED] > > > > > >- > >To unsubscribe, e-mail: [EMAIL PROTECTED] > >For additional commands, e-mail: [EMAIL PROTECTED] > > This e-mail, including any attachments, is a confidential business > communication, and may contain information that is confidential, > proprietary and/or privileged. This e-mail is intended only for the > individual(s) to whom it is addressed, and may not be saved, copied, > printed, disclosed or used by anyone else. If you are not the(an) intended > recipient, please immediately delete this e-mail from your computer system > and notify the sender. Thank you. > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] -- Ben Souther F.W. Davison & Company, Inc. REGISTER NOW FOR THE SCORPEO USER CONFERENCE! September 18-19, 2003 in Boston/Brookline, MA Additional Training Sessions held September 17, 2003 More info >> http://www.fwdco.com/services/Uconf03/default.shtm - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Question about Notify all online user
I've heard of hidden frames, but never seen them. (that's not a pun). could the hidden frame contain HTML that has a metarefresh of say 1 minute. The HTML is generated by a JSP. This JSP would track if there was a change. If there wasn't a change, just output a blank body with the meta refresh. If there *was* a change though, output a page that has some javascript onLoad stuff that will pop open a new window that contains * a static message that something changed * custom message that 'XYZ' changed. The popup page would then be driven by a JSP > -Original Message- > From: Shapira, Yoav [mailto:[EMAIL PROTECTED] > Sent: Wednesday, August 13, 2003 11:13 AM > To: Tomcat Users List > Subject: RE: Question about Notify all online user > > > > Howdy, > > >How to implement notifying all online user when the record > in database > has > >been changed? I am using Servlet and JSP to build a small > Supply-Chain > >system running on Tomcat with MySQL. > > Cool design question ;) You probably can't do it immediately > on change, but on the next page the user loads after the > change. Here's an > approach: > > - Have a Filter mapped to all requests (url-pattern /*) that > polls the DB or listens for the DB change event from another source. > > - Have a servlet that displays the contents of this change, > let's call it ServletA > > - When the DB changes, the filter is notified and does the following: > - Puts a "notified" attribute with value "false" in > every incoming request > - Gets a RequestDispatcher for ServletA and includes > its contents in the response > - Sets the "notified" attribute to value "true" after > chain.doFilter, i.e. on the response's way back to the browser > > It's just an idea, doubtless others will have a different take ; > > Yoav Shapira > > > > This e-mail, including any attachments, is a confidential > business communication, and may contain information that is > confidential, proprietary and/or privileged. This e-mail is > intended only for the individual(s) to whom it is addressed, > and may not be saved, copied, printed, disclosed or used by > anyone else. If you are not the(an) intended recipient, > please immediately delete this e-mail from your computer > system and notify the sender. Thank you. > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Question about Notify all online user
Thx ben, I do very areciate your help. - Original Message - From: "Ben Souther" <[EMAIL PROTECTED]> To: "Tomcat Users List" <[EMAIL PROTECTED]> Sent: Thursday, August 14, 2003 1:02 AM Subject: RE: Question about Notify all online user I'm not at liberty to give out any code but the implementation is pretty straight forward. An iframe (inline frame) is just an HTML tag that allows you to embed one webpage into another. A Google search will get you many examples of it's implementation. The IFrame is in a div that has it's visibility set to hidden. The page in the iframe meta refresh tag that causes it to reload every n seconds. I think we have it set to 60 seconds. Every time the frame refreshes, the servlet queries the database for unread messages. If it finds any, it rewrites page and adds a javascript function which is triggered from the body onload event that fires off a popup window telling the user how many unread messages they have. In our database, we have two attributes for this feature; is_new and is_read. The proc sets the is_new value to false every time it runs so that the user doesn't have to deal with a popup window every time the page refreshes (unless a new message shows up, of course). is_read is pretty self explanatory. When users first log in they are shown a list of unread messages. In our case the popup window is actually a hidden div with gets set to visible when it needs to pop up. This works nicely for us because we can put links to the messages right in the popup window. It's best to keep treads on the list. That way someone else will be able to read the answer and possibly avoid asking the same question. Hope this helps -Ben On Wednesday 13 August 2003 12:39 pm, you wrote: > Ben! > Wah! Great! Could you give me more information about your implementation? > I am not clear with iFrame. > > - Original Message - > From: "Ben Souther" <[EMAIL PROTECTED]> > To: "Tomcat Users List" <[EMAIL PROTECTED]> > Sent: Thursday, August 14, 2003 12:32 AM > Subject: Re: Question about Notify all online user > > > We're doing something like this with a hidden frame (an iFrame) that > refreshes > it self every n seconds (using the Meta refresh tag). The frame just points > to a servlet which queries the database for new messages. If there is a > new message, the iframe uses javascript to fire off a pop up. message. > > You're other option would be to use an applet that maintains a statefull > connection to your server. A applet list would be a better place to discuss > that approach though. > > On Wednesday 13 August 2003 12:07 pm, engp0510 wrote: > > Hi, all > > How to implement notifying all online user when the record in database > > has been changed? I am using Servlet and JSP to build a small > > Supply-Chain system running on Tomcat with MySQL. > > > > Thanks > > Zhidao -- Ben Souther F.W. Davison & Company, Inc. -- Ben Souther F.W. Davison & Company, Inc. REGISTER NOW FOR THE SCORPEO USER CONFERENCE! September 18-19, 2003 in Boston/Brookline, MA Additional Training Sessions held September 17, 2003 More info >> http://www.fwdco.com/services/Uconf03/default.shtm - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]