I need to create a chat Application using j2ee and web services.
can anyone help me out as to how to go about it.
I would be of great help if i receive some valuable suggestions from anyone.
Thanks a lot
Having never used j2ee, I would not know what to suggest, but I do know that I have successfully made a p2p chat program using j2se. Here are the basic classes and discriptions that went with my program:
created a server socket and was set up to recieve connections and send it on to a ServerThread to process additional input.
thread for recieving and processing information from a client
connected to the server, sent text messages, recieved messages and processed them.
Very basic interface simpley extending Serializeable and having no methods
implements message and holds a string of text to be displayed on every other connected client.
Although this is the core bones of my program, you should be able to start from there. The main classes that I used for connections are as follows:
from this, you should be able to reference the javadocs to learn how to program everything you want.
P.S. As I said, this is from my p2p chat program using j2se 1.4. I do not know if there is a different way to do this via web and j2ee, but this should at least give you a good start.
There are a few ways to go about settingup a chat application.
You can use the approach stated above, You can setup a web based servlet, or you can use RMI.
The latter 2 options are J2EE.
The servlet aproach means you build a servlet, which then runs on a J2EE enabled web server. The chat application can connect to this servlet to exchange information.
The RMI variant is slightly different in the way that it lets you perform straight method calls on remote objects. You would program the RMI classes and register them with the RMI registry. The application would then request a handle to the RMI class from the RMI registry, after which you can make method calls on the RMI class. These method calls can be blocking calls, so it is easy to see how you can use this for getting chat info from server to client.
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center