Welcome to the Java Programming Forums

The professional, friendly Java community. 21,500 members and growing!

The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 3 of 3

Thread: using socket and JSP for chatting

  1. #1
    Junior Member
    Join Date
    Feb 2014
    Thanked 0 Times in 0 Posts

    Default using socket and JSP for chatting

    I am new to JSP !! and I'm developing a web-based chatting system using JSP and socket.

    The problem i am facing is that the sender can send message but on the receiver side we have to manually refresh the page. The sender stays into blocking mode until the receiver refresh its page !
    after that i've implemented auto-refresh on the receiver side and "Connection Refused" exception is generated.
    I know this technique is not optimal , so please guide me regarding this matter.

    Thanks !

  2. #2
    Super Moderator
    Join Date
    Jun 2013
    So. Maryland, USA
    My Mood
    Thanked 878 Times in 861 Posts

    Default Re: using socket and JSP for chatting

    Welcome to the forum! Please read this topic to learn how to post code in code or highlight tags and other useful info for newcomers.

  3. #3
    Senior Member andbin's Avatar
    Join Date
    Dec 2013
    Thanked 141 Times in 132 Posts

    Default Re: using socket and JSP for chatting

    Quote Originally Posted by abhisolanki94 View Post
    I am new to JSP !! and I'm developing a web-based chatting system using JSP and socket.
    First: one thing is to use HTTP, web pages and possibly timed/auto-refresh of the page to implement a "chat" system (this approach is used by many chats offered by companies on the web for the customer-care). In this case sockets are unuseful/not necessary.
    All another thing is to implement a chat using a "custom" protocol (choosen by you) with sockets at TCP level on any port you like.

    So please, clarify the scenario and your expectations.
    Andrea, www.andbin.netSCJP 5 (91%) – SCWCD 5 (94%)

Similar Threads

  1. problem chatting with smack api with openfire server
    By calicratis19 in forum Java SE APIs
    Replies: 2
    Last Post: November 14th, 2013, 11:24 AM
  2. Replies: 12
    Last Post: October 22nd, 2013, 09:11 PM
  3. video chatting
    By shiva10162 in forum Java Networking
    Replies: 0
    Last Post: February 1st, 2013, 03:44 PM
  4. Chatting application in java (PUblic And private)
    By nakul dev in forum What's Wrong With My Code?
    Replies: 1
    Last Post: April 27th, 2012, 12:27 PM
  5. Java chatting program implementing socket logic
    By sivakrishna.g in forum Java Networking
    Replies: 2
    Last Post: October 20th, 2009, 12:47 AM