You can't _send_ information to another user unless all your users have an active connection to your server (live TCP connection). But you can surely have one user write a comment for another user so that the other user will be able to retrieve it. You're talking about writing servlet based chat service which is possible and has been probably done. Client has a Java Applet or some other client software and an open connection to the server.
d. Alex Pop wrote: > Hello everyone, > I know whenever a user deals with your server (makes requests) a session is > established which can be manipulated and tracked (using various methods). > Is it possible for a servlet to establish a session between two seperate > distinct users? So that they can pass information between them? How could > this be achieved? > > Thanks very much. > > My currnet line of thinking is to create a Hashtable which associates users > with their sessionID. > So then if one user wants to send information to another user, the > recipient is looked up in the hashtable, his sessionID obtained and then a > response is sent. > > My other thoughts was to setAttribute(user, session) thereby associating > the user with his session. however, in the servlet tutorials it states: > "Such attributes are accessible by any web component that belongs to the > same web context and is handling a request that is part of the same > session." > > A second, distinct user would not be part of the same session, right? And > what is the web context, exactly? > > > Thank you for your time, > Alex Pop > > ___________________________________________________________________________ > 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 > > > -- David Mossakowski [EMAIL PROTECTED] Instinet Corporation 212.310.7275 ******************************************************************************* <<Disclaimer>> This message is intended only for the use of the Addressee and may contain information that is PRIVILEGED and/or CONFIDENTIAL or both. This email is intended only for the personal and confidential use of the recipient(s) named above. If the reader of this email is not an intended recipient, you have received this email in error and any review, dissemination, distribution or copying is strictly prohibited. If you have received this email in error, please notify the sender immediately by return mail and permanently deleting the copy you received. Thank you. ******************************************************************************* ___________________________________________________________________________ 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
