File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSP and the fly likes Private message functionality Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Private message functionality" Watch "Private message functionality" New topic
Author

Private message functionality

Mala Sharma
Ranch Hand

Joined: Oct 29, 2004
Posts: 76
Hello,

I'm not sure if this is the right form for this (if it isn't, i apologize). i want to add a functionality to my web app that a user can send other user a private message that will be saved in the other user's mail box. I was thinking of using database to store and retrieve messages. Is this the right approach, if its not could someone please tell me what would be better. I'm not asking for the code but what to study or consider. This is my design so far, Servlet retrives the message from JSP text box and passes it to the bean that stores it in the database with the sender and recievers id (same functionaily of retriving it). THanks for your time.

Regards,
Mala
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

A database is how I would do it.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Mala Sharma
Ranch Hand

Joined: Oct 29, 2004
Posts: 76
Hey Ben,

Thanks for replying. Could you please explain to me the functionality of getting something like "MSN Messenger" on a website where viewers can chat one on one. Whats involved there. Again, i'm not asking for the code but direction on what i would need to use and learn. A little psuedocode(algorithm) would help. THanks a lot.

Mala
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60049
    
  65

There's a big difference between 'private messages' (which is sort of a lightweight e-mail), and instant chat. I would use a DB for messaging, but not for chatting. (I wouldn't use HTTP at all for chatting, but that's another issue).
[ February 22, 2005: Message edited by: Bear Bibeault ]

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Mala Sharma
Ranch Hand

Joined: Oct 29, 2004
Posts: 76
Hey Bear,

Thanks for replying. Ben clarified that my approach for private messaging was right. I didn't want to start a new thread to ask for chatting (sorry if that created confucion). What would you use for chatting? Whats the normal practice because i don't understand the concept at all. Only thing i know is you should NEVER go to database for doing that. Could you please point me to right direction on this. I just want to know what i should learn or look into. Thanks a lot.

Mala
[ February 22, 2005: Message edited by: Mala Sharma ]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60049
    
  65

Most chat apps I've seen that run in a browser use an Applet rather than HTTP.
Mala Sharma
Ranch Hand

Joined: Oct 29, 2004
Posts: 76
Hey Bear,
Could you please elaborate on it some more so i would have a general idea on what to look into and study. If you explain the flow, it would help me immensely in designing one (i know there must be some example if i google it, but i want to desgin my own without looking at any code). I would really appreicate it. THanks for your time.

Mala
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60049
    
  65

Actually, not my area of expertise -- nor is it a JSP question, so you'd be better off asking such a question in the Applet or Networking forums.
[ February 22, 2005: Message edited by: Bear Bibeault ]
Mala Sharma
Ranch Hand

Joined: Oct 29, 2004
Posts: 76
Thanks Bear, I'll ask there
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Private message functionality
 
Similar Threads
javascript message w/o alert
Static Factory Method
Not able to navigate the user to another jsp in servlets using RequestDispatcher
Auto suggest box overlapping problem
HashMap or database call