It is a Java servlet implements a specialized chat. You can not only type your messages, but share documents (web pages, local files) also.
How does it work? You can place on your web page (HTML page or WML page) a
hyperlink with the reference to this servlet. E.g. (for HTML):
<a href="http://your_host/servlet/Community?acme" target="_blank">Acme Community</a>
or for creating a separate window:
What is this for? From one side it is just a quick chat for your pages. But with the ability of sharing files (pages) you can also use this servlet as an online help for visitors. Some like 'call center' - you can answer questions in the real time, demonstrate slides (files) with some additional explanations etc.
It is a pure HTML implementation, so this version is free from any firewall's restrictions.
Servlet supports WAP/WML, so mobile users can join your community.
How to use it:
a) copy communityPackage.jar into WEB-INF/lib directory
b) describe servlet in web.xml file. So for your web.xml you need to add some like this:
c) define a mapping:
the usage is:
Runs the community with the given key. The own unique
key will identify each community. You may choose any string for this
key. So the same servlet can support more than one community. E.g.:
You must set common parameters for servlet in a configuration file.
You need to setup a full path to this file as an initial parameter for servlet.
Parameter's name is config:
Configuration file is a text file, each line describes one parameter in the form of
Empty lines and any line starts with # or // are ignored. Current version supports the following list of parameters:
# work directory. Points to any existing directory on your server
# background color for messages screen.
# background color for command screen.
# foreground color for messages screen.
# foreground color for command screen.
# font size (by default is current browser's font)
#font face (by default is current browser's font settings)
# title. Default value is 'Coldbeans community'
# header. You can set here a path your file with HTML content.
# DHTML usage. By default is 1 (enable DHTML).
# Admin's password. Default value is welcome
# Share web sites. 1 - enable, 0 - disable.
# Share local files. 1 - enable, 0 - disable
# How to announce new shared site.
# How to announce new shared file.
# settings for new windows with shared sites.
# Messages format. How to output messages.
# Inactivity timeout for users (in seconds). User will be
# Messages timeout (in seconds).
# Session timeout (in seconds). Session will be closed if
# Size for input field
# Login procedure.
# Localization support. You can set encoding for input and output
You may run this servlet without keyword:
in this case you will be asked to enter administrative password (see parameter password) and servlet will provide forms for community monitoring. You will be able for example to search (see) all communities (chats, rooms) according to the given keyword pattern.
You can set your own HTML file for login dialog. You have to provide
a form that submits user's name for Community servlet. Parameter name
for the field is user.
<form method="post" action="http://your_host/servlet/Community?acme">
Username: <input type="text" name="user"> <input type="submit" value="Submit">
You can even skip login dialog at all. You do not need to set parameter
login for this. Just create in your HTML (JSP) file a form with the hidden field
user, set an appropriate value for this field and submit this form through
<form name=myform" method="post" action="http://your_host/servlet/Community?acme">
<input type="hidden" name="user">
1. Servlet's configuration file can be saved anywhere on your server.
2. Directory for temporary files can be created anywhere on your server.
See also JSOS - the largest collection of servlets and filters.
Also in Coldtags: