Solved

A Chat Room

Posted on 2004-10-27
806 Views
Last Modified: 2012-05-05
Hey all.
Basically, I'm interested in coding a Chat Room (to run in a browser).

Now, firstly, I HATE Applets.. So, is it possible to do a Chat Room in JSP?  (I can think of a way to do it, but that would be great if possible).

If not though, and I end up getting stuck with having to use an Applet :( lol, could anyone explain to me how applets communicate with eachother.

For example, I've been on chat rooms (done using an applet), that doesn't require you giving it persmission to create connections else where... How do applet chat rooms work???

Thanks in advance! =)
[r.D]
0
Question by:DrWarezz
    18 Comments
     
    LVL 9

    Author Comment

    by:DrWarezz
    >"How do applet chat rooms work???"
    Do they create files on the server, and keep checking it for new messages, then update it to the chat room??????

    ta
    0
     
    LVL 86

    Accepted Solution

    by:
    >>lol, could anyone explain to me how applets communicate with eachother.

    In the case of the chat room is that they probably don't ;-)

    What will probably happen is that each applet communicates with a central server, which handles forwarding messages to each client applet. The advantage of using an applet (over an application) is that no installation is required and therefore distribution is a cinch. JSP is not really applicable as it doesn't really afford two-way communication
    0
     
    LVL 86

    Expert Comment

    by:CEHJ
    0
     
    LVL 1

    Assisted Solution

    by:cpa199
    They may well work using remote objects of some type (eg RMI). I haven't done one myslef but this is my guess.

    eg.

    You type a line of text and press enter, this then calls the sendText method on a remote object thus executing this code on the server and then using RMI callbacks gives this info to all the registered clients. For more info on RMI :

    http://java.sun.com/products/jdk/rmi/index.jsp
    http://www.ccs.neu.edu/home/kenb/com3337/rmi_tut.html

    Hope that helps

    Carl
    0
     
    LVL 35

    Assisted Solution

    by:TimYates
    0
     
    LVL 1

    Expert Comment

    by:cpa199
    Oh and applets are very powerful things. I personally love them, but I guess I have to working with them all the time :)

    Carl
    0
     
    LVL 8

    Assisted Solution

    by:kiranhk
    check out this

    http://www.vijaymukhi.com/  in this go to projects--->Java Chat Server and Chat Client
    0
     
    LVL 9

    Author Comment

    by:DrWarezz
    Wow. Thanks everyone.

    Tim, I've downloaded JChatBox, how do I then set it all up??

    I've got Tomcat installed on my machine, what to install where?? :o\  lol

    Thanks alot,
    [r.D]
    0
     
    LVL 86

    Expert Comment

    by:CEHJ
    I must say the JChatBox demo certainly doesn't work for me, either on IE or Netscape
    0
     
    LVL 9

    Author Comment

    by:DrWarezz
    Oh. Okay :o\

    =)
    0
     
    LVL 86

    Expert Comment

    by:CEHJ
    Servlet-based would have the advantage of no JRE being necessary, but make sure you've got plenty of memory for Tomcat ;-)
    0
     
    LVL 35

    Expert Comment

    by:TimYates
    >  I must say the JChatBox demo certainly doesn't work for me, either on IE or Netscape

    Yeah, all the chat rooms have been deleted :-/

    Bah!
    0
     
    LVL 92

    Assisted Solution

    by:objects
    > Servlet-based would have the advantage of no JRE being necessary

    you still need some form of client, use of servlets is independant of what is used on the client.
    and the large majority of java based servers are servlet based anyway.
    0
     
    LVL 9

    Author Comment

    by:DrWarezz
    Okay, thanks for all the comments everyone.
    I'll keep all those comments in mind, as I have a lot of thinking to do ;-)

    So -- I shall split the points now, otherwise I'll forget to at all. :-)

    Thanks again,
    [r.D]
    0
     
    LVL 35

    Expert Comment

    by:TimYates
    Have a look at the comments here too :-)

    http://www.experts-exchange.com/Web/Web_Languages/JSP/Q_21175850.html

    Good luck!!

    Tim
    0
     
    LVL 86

    Expert Comment

    by:CEHJ
    8-)
    0
     
    LVL 1

    Expert Comment

    by:cpa199
    Thanks and glad to help :)
    0
     
    LVL 92

    Expert Comment

    by:objects
    (:
    0

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone. Privacy Policy Terms of Use

    Featured Post

    Shellfire Box VPN + Lifetime Subscription

    The Shellfire Box easily connects all of your devices, even those that don't offer the possibility to establish a safe vpn connection. Access blocked content and surf safely, no matter where in the world you are located.

    After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
    Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
    Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
    This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.

    875 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    11 Experts available now in Live!

    Get 1:1 Help Now