nornapoci

Subtitle

Blog

Web chat application in java source code

Posted by [email protected] on

Java Socket Programming Examples


Here's an , although it's worth noting the demo doesn't implement all of the features available in the project, including file upload. Similarly jServer also is a application server and for chat over two different networks say a campus LAN and DSL at your house , it also need to be run on a computer with a global IP address. In any collaborative environment, it's important to have good tools for communication.


web chat application in java source code

If you take a look ChatCommunication. The server sends data to the client only. It has not been updated since then but it has been tested with latest Tomcat version, which is 8 at this time Oct, 2014 and it still works without any problem.


web chat application in java source code

Java Socket Programming Examples - And it features an API so you can extend it or connect it with other tools.


web chat application in java source code

It doesn't use applets, activeX controls or database. It isn't a commercial application but a freeware, which shows how JSP and Java Servlets can be used. If you know Java and JSP you can also source code of Java Classes and try to extend this application yourself. Note: If you are looking for socket based chat application in Java that can be downloaded from This chat application can be used for group discussion. You can download and use it in anyway you like but, please, don't remove the author information from any file. Users can create their own rooms. This application needs container with support for Servlet 2. It may work on Servlet 2. When his session expires his session will be destroyed automatically but information stored in application object won't be destroyed and will remain there. This application has been available for download since April, 2003 and no one has yet reported any problem with it. Please don't ask author how to configure it in your Servlet container as it works out of the box in Tomcat and Resin. Developers can also source code of Java classes which can be easily extended and try to fix bugs or extend and improve this application. After fixing bugs or extending this application you can send author the modified files so that he can update the application in future. Author wrote this application because he wanted to know how web based chat applications work and to improve his knowledge of JSP and Servlets. He was not able to find some complete example of it on web. He read Professional Java Server Programming from wrox and it provided him a starting point. As author just wanted to show how chat applications work, there is minimal validation done on user input. Validation is done only when it may affect the application functionality as it is just a demonstration of author's work. For example, an email address user provides, is not validated. But validation can be easily added. This application makes heavy use of ServletContext to store every object as no database is used. It is just plug and play kind of thing. So memory requirements may be high. Memory requirement will depend upon the number of users currently logged in. It won't, but if this application crashes or harms your computer in any way, author won't be responsible for it. Before downloading this application, you must read. As you have read, this application was written originally written in 2003. It has not been updated since then but it has been tested with latest Tomcat version, which is 8 at this time Oct, 2014 and it still works without any problem. Download this file 261 kb. You could also java source code, if you want to experiment yourself. After downloading this file extract its contents somewhere. In extracted files there will be a file named chat. The servlet container will extract contents of this chat. Look inside that folder to see what is there. It'll have documentation as well as jsp and other files. Then you can access this application by using a URL like. Replace localhost with name of your server. Developers can also source code of Java classes. Please don't contact author for any support as this application was done way back and he has been doing web development using PHP since then. You won't get any reply regarding this chat application. To edit this file before deploying you have to extract contents of this chat. In the files extracted there will be a directory named WEB-INF. In this directory there will be a file named web. After making the changes you have to recreate the chat. You can create this war file using any zip utility like JDK's jar or WinZip. After creating the zip file just change its extension from zip to war. There is also a file named chat. At server startup this file is read. If this file is missing then error is displayed in console and application won't work. There are few initialization parameters which can be changed. Comments have been added to this web. There are six parameters you can change. Parameter Name Parameter Value Description chatpropertyfile Any file name without any path. This file must be stored inside WEB-INF subdirectory of war file. You can change the name of the file which is used to store room names and description. Author recommends that you don't change this parameter. If true then all new rooms added by users will be saved in chat. Provide an e-mail address of the administrator of this application. This email address is displayed when any error occurs in application. On error page this email is displayed for contacting the admin. If user doesn't make any request after provided minutes he will be automatically logged out and his information will be destroyed. Default is 30 minutes refreshAfter no. Default is 10 seconds. After this limit is reached older messages are removed. Set this to some reasonable value depending upon the no. If you liked the software and want to support author, please visit some of the google sponsers. If you like our script, please rate it!

Categories: None

Post a Comment

Oops!

Oops, you forgot something.

Oops!

The words you entered did not match the given text. Please try again.

Already a member? Sign In

0 Comments