Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4120898
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T23:16:55+00:00 2026-05-20T23:16:55+00:00

I am developing a chat client using java. I was able to connect to

  • 0

I am developing a chat client using java. I was able to connect to gtalk as well as chat using SMACK API. Now I need to do the same with jsp servlets and ajax.

I could do the authentication and getting the buddy list with jsp and servlets only. But I have to use Ajax for the chat (so that page won’t be refreshed).

for sending and receving msgs I use the api s classes in java. The code is below:

public void sendMessage(String message, String to) throws XMPPException
{
Chat chat = connection.getChatManager().createChat(to, this);
chat.sendMessage(message);
}

public void processMessage(Chat chat, Message message)
{
if(message.getType() == Message.Type.chat)
System.out.println(chat.getParticipant() + " says: " + message.getBody());
}

Now how do I do the same in Ajax? Can I use the API methods along with ajax? Or use these in servlets and get the response from servlets with ajax and populate the msg s on the page?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T23:16:55+00:00Added an answer on May 20, 2026 at 11:16 pm

    Have a look at DWR

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am developing a chat website using jsp/servlet.I will be hosting my website on
I am developing a chat application. But Right now chatting is possible with only
I am developing a chat application over android and i need an xmpp chat
Developing a heavily XML-based Java-application, I recently encountered an interesting problem on Ubuntu Linux.
I am currently developing android XMPP client to communicate with the Tigase server setup
I am developing a chat module for drupal. I plan to provide multiple backends
I am developing a Cocoa application which involves a chat element. One approach I've
In Virgil Dobjanschi's talk, Developing Android REST client applications (link here ), he said
I'm developing open source cross-platform platform for non-realtime multiplayer chat/game system. Like card games,
Lets say i am developing a chat, first you come to a login window

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.